1+ /* *
2+ * Dynamically (re)create the support menus
3+ *
4+ * Generates and updates the Support menus so that they can be displayed by
5+ *
6+ * Params: None.
7+ *
8+ * Return: None.
9+ */
10+
11+ // MY_SUBMENU_inCommunication =
12+ // [
13+ // ["User submenu",true],
14+ // ["Option-1", [2], "", -5, [["expression", "player sidechat ""-1"" "]], "0", "0", "\ca\ui\data\cursor_support_ca"],
15+ // ["Option 0", [3], "", -5, [["expression", "player sidechat "" 0"" "]], "1", "0", "\ca\ui\data\cursor_support_ca"],
16+ // ["Option 1", [4], "", -5, [["expression", "player sidechat "" 1"" "]], "1", "CursorOnGround", "\ca\ui\data\cursor_support_ca"]
17+ // ];
18+
19+ _itemsCount = 0 ;
20+ _offensiveItems = [];
21+ _logisticsItems = [];
22+ _transportItems = [];
23+
24+ _Ucode = " dyn_menu = [[" " User menu" " ,false]," ;
25+
26+
27+ if (support_mortar_available) then {
28+ _text = " [" " Mortar" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 1" " ]]" ;
29+ _offensiveItems pushBack _text ;
30+ } else {
31+ // code is same as above, BUT 'isActive' is false.
32+ _text = " [" " Mortar" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 0" " ]]" ;
33+ _offensiveItems pushBack _text ;
34+ };
35+
36+ if (support_arty_available) then {
37+ _text = " [" " Artillery" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 1" " ]]" ;
38+ _offensiveItems pushBack _text ;
39+ } else {
40+ _text = " [" " Artillery" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 0" " ]]" ;
41+ _offensiveItems pushBack _text ;
42+ };
43+
44+ if (support_cluster_available) then {
45+ _text = " [" " Cluster Bomb" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 1" " ]]" ;
46+ _offensiveItems pushBack _text ;
47+ } else {
48+ _text = " [" " Cluster Bomb" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 0" " ]]" ;
49+ _offensiveItems pushBack _text ;
50+ };
51+
52+ if (support_jdam_available) then {
53+ _text = " [" " JDAM" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 1" " ]]" ;
54+ _offensiveItems pushBack _text ;
55+ } else {
56+ _text = " [" " JDAM" " , [0], " " " " , -5, [[" " expression" " , " " player sidechat " " " " First" " " " " " ]], " " 1" " , " " 0" " ]]" ;
57+ _offensiveItems pushBack _text ;
58+ };
59+
60+ _finalString = " offensive_SubMenu = [[" " Offensive Supports" " ,true]," ;
61+ _finalString + = _offensiveItems joinString " ," ;
62+
63+ diag_log format [" DUWS-R: Compiling this string (%1)" ,_finalString ];
64+ _myCode = call compile _finalString ;
65+
66+ // if(support_supplydrop_available) then {
67+ // }
68+ // support_paradrop_available = false;
69+ // support_pFLIR_available = false;
70+ // support_uav_recon_available = false;
71+ // support_veh_refit_available = false;
72+
73+ // support_helotaxi_available = false;
74+ // support_boattaxi_available = false;
75+
76+ if (count _itemsCount > 0 ) then {
77+ // _Ucode =
78+ // call compile _Ucode;
79+ // showCommandingMenu "#USER:MY_MENU_inCommunication";
80+ } else {
81+ player commandChat " No support items available at this time!" ;
82+ }
0 commit comments