summaryrefslogtreecommitdiffstats
path: root/Client/GUI/GUI_CommandMenu.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:54:45 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:54:45 +0300
commit68d4c9bbd80ed2e6528244569c79676b87295bd1 (patch)
tree6efd42fbf6f1281874ae0ff1f8816b01fe0c7153 /Client/GUI/GUI_CommandMenu.sqf
downloada2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.gz
a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.bz2
a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.zip
init
Diffstat (limited to 'Client/GUI/GUI_CommandMenu.sqf')
-rw-r--r--Client/GUI/GUI_CommandMenu.sqf53
1 files changed, 53 insertions, 0 deletions
diff --git a/Client/GUI/GUI_CommandMenu.sqf b/Client/GUI/GUI_CommandMenu.sqf
new file mode 100644
index 0000000..c373036
--- /dev/null
+++ b/Client/GUI/GUI_CommandMenu.sqf
@@ -0,0 +1,53 @@
+
+private ["_enable","_exited"];
+MenuAction = -1;
+
+while {alive player && dialog} do {
+ //--- Command AI.
+ _enable = false;
+ if (!isNull(commanderTeam)) then {if (commanderTeam == group player) then {_enable = true}};
+ ctrlEnable [13001,_enable]; //--- Team Orders
+ ctrlEnable [13004,_enable]; //--- Commander Menu
+ ctrlEnable [13002,commandInRange]; //--- Special Menu
+ ctrlEnable [13003,commandInRange]; //--- Upgrade Menu
+
+ sleep 0.1;
+
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ //--- Command AI.
+ if (MenuAction == 1) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscOrderMenu";
+ };
+
+ //--- Artillery Menu.
+ if (MenuAction == 2) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscArtilleryMenu";
+ };
+
+ //--- Upgrade Menu.
+ if (MenuAction == 3) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscUpgradeMenu";
+ };
+
+ //--- Commander Menu.
+ if (MenuAction == 4) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscCommanderMenu";
+ };
+
+ //--- Support Menu.
+ if (MenuAction == 5) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscSupportMenu";
+ };
+}; \ No newline at end of file