mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Unit tools control group
This commit is contained in:
parent
840d766d83
commit
e012fbc7f9
@ -6,7 +6,7 @@ class RscStructuredText;
|
|||||||
class RscText;
|
class RscText;
|
||||||
class RscTree;
|
class RscTree;
|
||||||
|
|
||||||
class GVAR(overlay) {
|
class GVAR(interface) {
|
||||||
idd = 12249;
|
idd = 12249;
|
||||||
enableSimulation = 1;
|
enableSimulation = 1;
|
||||||
movingEnable = 0;
|
movingEnable = 0;
|
||||||
@ -141,33 +141,42 @@ class GVAR(overlay) {
|
|||||||
idc = -1;
|
idc = -1;
|
||||||
style = 64;
|
style = 64;
|
||||||
};
|
};
|
||||||
class unitTree: RscTree {
|
class unitTools: RscControlsGroup {
|
||||||
idc = IDC_TREE;
|
idc = IDC_UNIT;
|
||||||
x = safeZoneX;
|
x = safeZoneX;
|
||||||
y = safezoneY + TOOL_H * 2;
|
y = safeZoneY + TOOL_H * 2;
|
||||||
w = TOOL_W * 2;
|
w = TOOL_W * 2;
|
||||||
h = safeZoneH - TOOL_H * 5;
|
h = safeZoneH - TOOL_H * 4;
|
||||||
borderSize = 1;
|
class controls {
|
||||||
colorBorder[] = {1,1,1,1};
|
class unitTree: RscTree {
|
||||||
colorBackground[] = {0.1,0.1,0.1,0.8};
|
idc = IDC_UNIT_TREE;
|
||||||
colorSelect[] = {
|
x = 0;
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
|
y = 0;
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
|
w = TOOL_W * 2;
|
||||||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
|
h = safeZoneH - TOOL_H * 5;
|
||||||
1
|
borderSize = 1;
|
||||||
|
colorBorder[] = {1,1,1,1};
|
||||||
|
colorBackground[] = {0.1,0.1,0.1,0.8};
|
||||||
|
colorSelect[] = {
|
||||||
|
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
|
||||||
|
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
|
||||||
|
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
|
||||||
|
1
|
||||||
|
};
|
||||||
|
multiselectEnabled = 0;
|
||||||
|
maxHistoryDelay = -1;
|
||||||
|
onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface));
|
||||||
|
};
|
||||||
|
class unitRefresh: RscButtonMenu {
|
||||||
|
x = 0;
|
||||||
|
y = safeZoneY + safeZoneH - TOOL_H * 3;
|
||||||
|
w = TOOL_W * 2;
|
||||||
|
h = TOOL_H;
|
||||||
|
sizeEx = TOOL_H;
|
||||||
|
text = CSTRING(RefreshList);
|
||||||
|
action = QUOTE([] call FUNC(handleTree));
|
||||||
|
};
|
||||||
};
|
};
|
||||||
multiselectEnabled = 0;
|
|
||||||
maxHistoryDelay = -1;
|
|
||||||
onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface));
|
|
||||||
};
|
|
||||||
class unitRefresh: RscButtonMenu {
|
|
||||||
x = safeZoneX;
|
|
||||||
y = safeZoneY + safeZoneH - TOOL_H * 3;
|
|
||||||
w = TOOL_W * 2;
|
|
||||||
h = TOOL_H;
|
|
||||||
sizeEx = TOOL_H;
|
|
||||||
text = CSTRING(RefreshList);
|
|
||||||
action = QUOTE([] call FUNC(handleTree));
|
|
||||||
};
|
};
|
||||||
class spectatorMap: RscMapControl {
|
class spectatorMap: RscMapControl {
|
||||||
idc = IDC_MAP;
|
idc = IDC_MAP;
|
||||||
|
@ -70,7 +70,7 @@ switch (toLower _mode) do {
|
|||||||
[allUnits] call FUNC(updateUnits);
|
[allUnits] call FUNC(updateUnits);
|
||||||
|
|
||||||
// Create the dialog
|
// Create the dialog
|
||||||
createDialog QGVAR(overlay);
|
createDialog QGVAR(interface);
|
||||||
|
|
||||||
// Cache and disable nametag settings
|
// Cache and disable nametag settings
|
||||||
if (["ace_nametags"] call EFUNC(common,isModLoaded)) then {
|
if (["ace_nametags"] call EFUNC(common,isModLoaded)) then {
|
||||||
@ -202,7 +202,7 @@ switch (toLower _mode) do {
|
|||||||
};
|
};
|
||||||
case 14: { // Backspace
|
case 14: { // Backspace
|
||||||
private ["_tree","_show"];
|
private ["_tree","_show"];
|
||||||
_tree = _display displayCtrl IDC_TREE;
|
_tree = _display displayCtrl IDC_UNIT;
|
||||||
_show = !ctrlShown _tree;
|
_show = !ctrlShown _tree;
|
||||||
|
|
||||||
_tree ctrlShow _show;
|
_tree ctrlShow _show;
|
||||||
|
@ -25,7 +25,7 @@ if !(isNil QGVAR(treePFH)) then {
|
|||||||
// Fetch tree
|
// Fetch tree
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_display = GETUVAR(GVAR(display),displayNull);
|
_display = GETUVAR(GVAR(display),displayNull);
|
||||||
_ctrl = _display displayCtrl IDC_TREE;
|
_ctrl = (_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE;
|
||||||
|
|
||||||
// Cache current selection
|
// Cache current selection
|
||||||
_curSelData = _ctrl tvData (tvCurSel _ctrl);
|
_curSelData = _ctrl tvData (tvCurSel _ctrl);
|
||||||
@ -77,7 +77,7 @@ GVAR(treePFH) = [{
|
|||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_display = GETUVAR(GVAR(display),displayNull);
|
_display = GETUVAR(GVAR(display),displayNull);
|
||||||
_ctrl = _display displayCtrl IDC_TREE;
|
_ctrl = (_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE;
|
||||||
|
|
||||||
_nodes = (_ctrl tvCount []) - 1;
|
_nodes = (_ctrl tvCount []) - 1;
|
||||||
for "_n" from 0 to _nodes do {
|
for "_n" from 0 to _nodes do {
|
||||||
@ -88,7 +88,7 @@ GVAR(treePFH) = [{
|
|||||||
|
|
||||||
if (isNull _unit || !alive _unit) then {
|
if (isNull _unit || !alive _unit) then {
|
||||||
_ctrl tvDelete [_n,_i];
|
_ctrl tvDelete [_n,_i];
|
||||||
GVAR(unitList) = GVAR(unitList) - [_unit];
|
[[_unit],false] call FUNC(updateUnits);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -29,12 +29,16 @@
|
|||||||
#define COMPASS_X (safeZoneW * 0.5 - (COMPASS_W * 0.5))
|
#define COMPASS_X (safeZoneW * 0.5 - (COMPASS_W * 0.5))
|
||||||
|
|
||||||
// IDCs
|
// IDCs
|
||||||
#define IDC_TOOL 3000
|
|
||||||
#define IDC_COMP 4490
|
#define IDC_COMP 4490
|
||||||
#define IDC_TREE 6187
|
#define IDC_COMP_0 5000
|
||||||
#define IDC_MAP 6791
|
#define IDC_COMP_90 5090
|
||||||
#define IDC_HELP 7631
|
#define IDC_COMP_180 5180
|
||||||
|
#define IDC_COMP_270 5270
|
||||||
|
|
||||||
|
#define IDC_HELP 7631
|
||||||
|
#define IDC_MAP 6791
|
||||||
|
|
||||||
|
#define IDC_TOOL 3000
|
||||||
#define IDC_TOOL_CLOCK 3003
|
#define IDC_TOOL_CLOCK 3003
|
||||||
#define IDC_TOOL_FOCUS 3004
|
#define IDC_TOOL_FOCUS 3004
|
||||||
#define IDC_TOOL_FOV 3005
|
#define IDC_TOOL_FOV 3005
|
||||||
@ -42,7 +46,5 @@
|
|||||||
#define IDC_TOOL_SPEED 3006
|
#define IDC_TOOL_SPEED 3006
|
||||||
#define IDC_TOOL_VIEW 3002
|
#define IDC_TOOL_VIEW 3002
|
||||||
|
|
||||||
#define IDC_COMP_0 5000
|
#define IDC_UNIT 6002
|
||||||
#define IDC_COMP_90 5090
|
#define IDC_UNIT_TREE 6187
|
||||||
#define IDC_COMP_180 5180
|
|
||||||
#define IDC_COMP_270 5270
|
|
||||||
|
Loading…
Reference in New Issue
Block a user