Interface tweaks

This commit is contained in:
SilentSpike 2015-07-19 13:03:40 +01:00
parent 8d6f167d97
commit 935430ea59
3 changed files with 26 additions and 35 deletions

View File

@ -82,7 +82,7 @@ class GVAR(interface) {
class toolbar: RscControlsGroupNoScrollbars {
idc = IDC_TOOL;
x = safeZoneX;
y = safeZoneY;
y = safeZoneY + safeZoneH - TOOL_H;
w = safeZoneW;
h = TOOL_H;
class controls {
@ -144,19 +144,12 @@ class GVAR(interface) {
};
};
};
class unitTools: RscControlsGroupNoScrollbars {
class unitTree: RscTree {
idc = IDC_UNIT;
x = safeZoneX;
y = safeZoneY + TOOL_H * 2;
w = TOOL_W * 2;
h = safeZoneH;
class controls {
class unitTree: RscTree {
idc = IDC_UNIT_TREE;
x = 0;
y = 0;
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 5;
h = safeZoneH - TOOL_H * 4;
sizeEx = H_PART(0.8);
borderSize = 1;
colorBorder[] = {COL_FORE};
@ -170,18 +163,6 @@ class GVAR(interface) {
multiselectEnabled = 0;
onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface));
};
class unitRandom: RscButtonMenu {
x = 0;
y = safeZoneH - TOOL_H * 5;
w = TOOL_W * 2;
h = TOOL_H;
sizeEx = TOOL_H;
colorBackground[] = {COL_FORE_D};
text = CSTRING(RandomUnit);
action = QUOTE([nil,objNull] call FUNC(updateCamera));
};
};
};
class mapOverlay: RscMapControl {
idc = IDC_MAP;
x = safeZoneX;
@ -210,6 +191,17 @@ class GVAR(interface) {
sizeEx = H_PART(1);
text = CSTRING(HelpTitle);
};
class helpExit: RscButtonMenu {
x = W_PART(23);
y = 0;
h = H_PART(1);
w = W_PART(1);
colorText[]={COL_FORE};
colorBackground[] = {COL_FORE_D};
sizeEx = H_PART(1);
text = "X";
action = QUOTE(GVAR(showHelp) = false; [] call FUNC(updateInterface));
};
};
};
};

View File

@ -34,7 +34,7 @@ if !(GVAR(camUnit) in GVAR(unitList)) then {
private ["_ctrl","_curSelData","_cachedGrps","_grp","_node","_side","_index"];
// Fetch tree
_ctrl = (_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE;
_ctrl = _display displayCtrl IDC_UNIT;
// Cache current selection
_curSelData = _ctrl tvData (tvCurSel _ctrl);

View File

@ -47,7 +47,6 @@
#define IDC_TOOL_VIEW 3002
#define IDC_UNIT 6002
#define IDC_UNIT_TREE 6187
// UI colours
#define COL_BACK 0.1,0.1,0.1,0.8