Update spectator UI styling

Adds a title to the unit tree to match the help list and enters the title text.
This commit is contained in:
SilentSpike 2015-08-07 15:15:04 +01:00
parent 702e50b731
commit 1c79c8fa45
4 changed files with 53 additions and 24 deletions

View File

@ -137,11 +137,11 @@ class GVAR(interface) {
idc = -1;
style = 64;
};
class fovTool: viewTool {
class zoomTool: viewTool {
idc = IDC_TOOL_FOV;
x = safeZoneW - TOOL_W * 2 - MARGIN;
};
class fovFrame: fovTool {
class zoomFrame: zoomTool {
idc = -1;
style = 64;
};
@ -155,25 +155,52 @@ class GVAR(interface) {
};
};
};
class unitTree: RscTree {
class unitTree: RscControlsGroupNoScrollbars {
idc = IDC_UNIT;
x = safeZoneX;
y = safeZoneY + TOOL_H * 6;
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 13;
sizeEx = H_PART(0.8);
borderSize = 1;
colorText[] = {COL_FORE};
colorBorder[] = {COL_FORE};
colorBackground[] = {COL_BACK};
colorSelect[] = {
"profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]",
"profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]",
"profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]",
1
class controls {
class unitTitle: RscText {
x = 0;
y = 0;
w = TOOL_W * 2;
h = H_PART(1);
style = 2;
colorText[] = {COL_FORE};
colorBackground[] = {COL_FORE_D};
sizeEx = H_PART(1);
text = CSTRING(UnitTitle);
};
class unitTree: RscTree {
idc = IDC_UNIT_TREE;
x = 0;
y = H_PART(1);
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 14;
sizeEx = H_PART(0.8);
colorText[] = {COL_FORE};
colorBorder[] = {0,0,0,0};
colorBackground[] = {COL_BACK};
colorSelect[] = {
"profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]",
"profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]",
"profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]",
1
};
multiselectEnabled = 0;
onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface));
};
class unitFrame: RscFrame {
x = 0;
y = 0;
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 13;
shadow = 2;
colorText[] = {COL_FORE};
};
};
multiselectEnabled = 0;
onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface));
};
class mapOverlay: RscMapControl {
idc = IDC_MAP;
@ -191,16 +218,13 @@ class GVAR(interface) {
y = safeZoneY + TOOL_H * 6;
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 13;
colorText[] = {COL_FORE};
colorSelectBackground[] = {COL_FORE_D};
colorSelectBackground2[] = {COL_BACK};
colorBackground[] = {0,0,0,0};
class controls {
class helpTitle: RscText {
x = 0;
y = 0;
w = TOOL_W * 2;
h = H_PART(1);
style = 2;
colorText[] = {COL_FORE};
colorBackground[] = {COL_FORE_D};
sizeEx = H_PART(1);
@ -213,15 +237,16 @@ class GVAR(interface) {
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 14;
colorBackground[] = {COL_BACK};
sizeEx = H_PART(0.8);
default = 1;
};
class helpFrame: RscText {
class helpFrame: RscFrame {
x = 0;
y = 0;
w = TOOL_W * 2;
h = safeZoneH - TOOL_H * 13;
shadow = 2;
colorText[] = {COL_FORE};
style = 64;
};
};
};

View File

@ -36,5 +36,5 @@ if !(GVAR(camUnit) in GVAR(unitList)) then {
// Reduce overhead when unit tree is hidden
if (ctrlShown (_display displayCtrl IDC_UNIT)) then {
// Reduce overhead by spreading across frames
[FUNC(handleInterface),["onUnitsUpdate",[_display displayCtrl IDC_UNIT]],1] call EFUNC(common,waitAndExecute);
[FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call EFUNC(common,waitAndExecute);
};

View File

@ -49,8 +49,9 @@
#define IDC_TOOL_VISION 3004
#define IDC_UNIT 6002
#define IDC_UNIT_TREE 6005
// UI colours
#define COL_BACK 0.1,0.1,0.1,0.8
#define COL_BACK 0.1,0.1,0.1,0.7
#define COL_FORE 1,1,1,1
#define COL_FORE_D 0.1,0.1,0.1,1
#define COL_FORE_D 0.1,0.1,0.1,0.8

View File

@ -101,6 +101,9 @@
<Polish>Termowizja</Polish>
</Key>
<!-- Interface strings -->
<Key ID="STR_ACE_Spectator_UnitTitle">
<English>Spectator Units</English>
</Key>
<Key ID="STR_ACE_Spectator_HelpTitle">
<English>Spectator Controls</English>
<Polish>Sterowanie obserwatorem</Polish>