From 87c3a7a334e471d62b7dd17d6df95e46323d5b5f Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Tue, 24 Apr 2018 13:46:59 -0400 Subject: [PATCH] Zeus - Improve Editable Objects module and Cleanup (#6294) * Improve Update Editable Objects ui and add icon * Cleanup and remove broken attribute position * Use QQGVAR --- addons/zeus/CfgVehicles.hpp | 1 + addons/zeus/XEH_PREP.hpp | 1 - addons/zeus/XEH_postInit.sqf | 2 +- .../functions/fnc_ui_attributePosition.sqf | 60 --------- .../zeus/functions/fnc_ui_attributeRadius.sqf | 10 +- addons/zeus/functions/fnc_ui_defendArea.sqf | 28 ++-- .../zeus/functions/fnc_ui_editableObjects.sqf | 40 +++--- addons/zeus/functions/fnc_ui_patrolArea.sqf | 28 ++-- addons/zeus/functions/fnc_ui_searchArea.sqf | 32 +++-- .../zeus/functions/fnc_ui_suicideBomber.sqf | 2 +- addons/zeus/stringtable.xml | 87 +++++-------- .../Icon_Module_Zeus_Editable_Objects_ca.paa | Bin 0 -> 5625 bytes addons/zeus/ui/RscAttributes.hpp | 120 +++++++----------- 13 files changed, 143 insertions(+), 268 deletions(-) delete mode 100644 addons/zeus/functions/fnc_ui_attributePosition.sqf create mode 100644 addons/zeus/ui/Icon_Module_Zeus_Editable_Objects_ca.paa diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 63d221c1e3..74095cb4a2 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -159,6 +159,7 @@ class CfgVehicles { category = QGVAR(Utility); displayName = CSTRING(ModuleEditableObjects_DisplayName); curatorInfoType = QGVAR(RscEditableObjects); + icon = QPATHTOF(ui\Icon_Module_Zeus_Editable_Objects_ca.paa); }; class GVAR(moduleGlobalSetSkill): GVAR(moduleBase) { category = QGVAR(AI); diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index 4fa21ff340..910b0db4d1 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -41,7 +41,6 @@ PREP(moduleUnGarrison); PREP(moduleZeusSettings); PREP(showMessage); PREP(ui_attributeCargo); -//PREP(ui_attributePosition); PREP(ui_attributeRadius); PREP(ui_defendArea); PREP(ui_garrison); diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index adf3d75a9b..2294e3a454 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -20,6 +20,7 @@ QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); // Editable object commands must be ran on server, this events are used in the respective module if (isServer) then { [QGVAR(equipFries), EFUNC(fastroping,equipFRIES)] call CBA_fnc_addEventHandler; + [QGVAR(addObjects), { params ["_objects", ["_curator", objNull]]; @@ -29,7 +30,6 @@ if (isServer) then { _x addCuratorEditableObjects [_objects, true]; } forEach allCurators; }] call CBA_fnc_addEventHandler; - [QGVAR(removeObjects), { params ["_objects", ["_curator", objNull]]; diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf deleted file mode 100644 index 6143a7bf21..0000000000 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Author: SilentSpike - * Initalises the `position` zeus module attribute - * - * Arguments: - * 0: position controls group - * - * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_attributePosition - * - * Public: No - */ -#include "script_component.hpp" - -//Generic Init: -params ["_control"]; -private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - -_control ctrlRemoveAllEventHandlers "setFocus"; - -//Specific on-load stuff: -private _map = _control controlsGroupCtrl 26469; - -// Centre map on the logic initially -_map ctrlMapAnimAdd [0, ctrlMapScale _map, _logic]; -ctrlMapAnimCommit _map; - -private _fnc_onDraw = { - params ["_map"]; - - private _display = ctrlParent _map; - private _pos = GETVAR(_display,GVAR(position),[]); - private _radius = GETVAR(_display,GVAR(radius),0); - - if !(_pos isEqualTo []) then { - // Works alongside radius attribute - if (_radius == 0) then { - _map drawIcon ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,0,1], _pos, 19, 19, 0, "", 0, 0]; - } else { - _map drawEllipse [_pos, _radius, _radius, 0, [0,0,0,1], ""]; - }; - }; -}; - -private _fnc_onMapClick = { - params ["_map","_button"]; - - if (_button == 0) then { - private _display = ctrlParent _map; - SETVAR(_display,GVAR(position),_pos); - }; -}; - -SETVAR(_display,GVAR(position),getPos _logic); -_map ctrlAddEventHandler ["draw",_fnc_onDraw]; -_map ctrlAddEventHandler ["mouseButtonDown",_fnc_onMapClick]; diff --git a/addons/zeus/functions/fnc_ui_attributeRadius.sqf b/addons/zeus/functions/fnc_ui_attributeRadius.sqf index 4a24a21349..3fccb19fab 100644 --- a/addons/zeus/functions/fnc_ui_attributeRadius.sqf +++ b/addons/zeus/functions/fnc_ui_attributeRadius.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Initalises the `radius` zeus module attribute + * Initializes the "Radius" Zeus module attribute. * * Arguments: * 0: radius controls group @@ -15,13 +15,13 @@ */ #include "script_component.hpp" -//Generic Init: +// Generic init params ["_control"]; private _display = ctrlParent _control; -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -//Specific on-load stuff: +// Specific onLoad stuff private _edit = _control controlsGroupCtrl 26467; _edit ctrlSetText "100"; @@ -44,4 +44,4 @@ private _fnc_onKeyUp = { }; [_display] call _fnc_onKeyUp; -_display displayAddEventHandler ["keyUp", _fnc_onKeyUp]; +_display displayAddEventHandler ["KeyUp", _fnc_onKeyUp]; diff --git a/addons/zeus/functions/fnc_ui_defendArea.sqf b/addons/zeus/functions/fnc_ui_defendArea.sqf index e5fc26ef4e..cd3153d628 100644 --- a/addons/zeus/functions/fnc_ui_defendArea.sqf +++ b/addons/zeus/functions/fnc_ui_defendArea.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Initalises the `defend area` zeus module display + * Initializes the "Defend Area" Zeus module display. * * Arguments: * 0: dummy controls group @@ -15,14 +15,14 @@ */ #include "script_component.hpp" -//Generic Init: +// Generic init params ["_control"]; private _display = ctrlParent _control; private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -//Validate the module target: +// Validate module target private _unit = effectiveCommander (attachedTo _logic); scopeName "Main"; @@ -47,30 +47,28 @@ switch (false) do { }; private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - if (_this select 1 == 2) then { - deleteVehicle _logic; - }; + deleteVehicle _logic; }; private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _unit = effectiveCommander (attachedTo _logic); - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); + private _radius = GETVAR(_display,GVAR(radius),100); + private _position = getPos _logic; - [QGVAR(moduleDefendArea), [_unit,_position,_radius], _unit] call CBA_fnc_targetEvent; + [QGVAR(moduleDefendArea), [_unit, _position, _radius], _unit] call CBA_fnc_targetEvent; deleteVehicle _logic; }; -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_control ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_editableObjects.sqf b/addons/zeus/functions/fnc_ui_editableObjects.sqf index 6b1c30ad8c..7f817e6b90 100644 --- a/addons/zeus/functions/fnc_ui_editableObjects.sqf +++ b/addons/zeus/functions/fnc_ui_editableObjects.sqf @@ -1,6 +1,6 @@ /* - * Author: Fisher, SilentSpike - * Updated all/local curator with objects in the module radius. + * Author: Fisher, SilentSpike, mharis001 + * Initializes the "Editable Objects" Zeus module display. * * Arguments: * 0: editableObjects controls group @@ -17,24 +17,23 @@ params ["_control"]; -//Generic Init: +// Generic Init private _display = ctrlParent _control; private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); -TRACE_1("logicObject",_logic); +TRACE_1("Logic Object",_logic); -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -//Specific on-load stuff: -(_display displayCtrl 16188) cbSetChecked true; +// Specific onLoad stuff +(_display displayCtrl 19181) lbSetCurSel 1; +(_display displayCtrl 19182) lbSetCurSel 1; private _fnc_onUnload = { private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - if (_this select 1 == 2) then { - deleteVehicle _logic; - }; + deleteVehicle _logic; }; private _fnc_onConfirm = { @@ -46,22 +45,19 @@ private _fnc_onConfirm = { private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); - private _allCurators = cbChecked (_display displayCtrl 16188); - private _removeObjects = cbChecked (_display displayCtrl 16189); + private _radius = GETVAR(_display,GVAR(radius),100); + private _editingMode = lbCurSel (_display displayCtrl 19181) > 0; + private _allCurators = [getAssignedCuratorLogic player, objNull] select (lbCurSel (_display displayCtrl 19182)); + private _objects = nearestObjects [getPos _logic, ["All"], _radius]; - private _objects = nearestObjects [_position, ["All"], _radius]; - private _localCurator = [getAssignedCuratorLogic player, objNull] select _allCurators; - - if (_removeObjects) then { - [QGVAR(removeObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; + if (_editingMode) then { + [QGVAR(addObjects), [_objects, _allCurators]] call CBA_fnc_serverEvent; } else { - [QGVAR(addObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; + [QGVAR(removeObjects), [_objects, _allCurators]] call CBA_fnc_serverEvent; }; deleteVehicle _logic; }; -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_patrolArea.sqf b/addons/zeus/functions/fnc_ui_patrolArea.sqf index 1ce329047d..89947afb22 100644 --- a/addons/zeus/functions/fnc_ui_patrolArea.sqf +++ b/addons/zeus/functions/fnc_ui_patrolArea.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Initalises the `patrol area` zeus module display + * Initializes the "Patrol Area" Zeus module display. * * Arguments: * 0: dummy controls group @@ -15,14 +15,14 @@ */ #include "script_component.hpp" -//Generic Init: +// Generic init params ["_control"]; private _display = ctrlParent _control; private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -//Validate the module target: +// Validate module target private _unit = effectiveCommander (attachedTo _logic); scopeName "Main"; @@ -47,30 +47,28 @@ switch (false) do { }; private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - if (_this select 1 == 2) then { - deleteVehicle _logic; - }; + deleteVehicle _logic; }; private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _unit = effectiveCommander (attachedTo _logic); - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); + private _radius = GETVAR(_display,GVAR(radius),100); + private _position = getPos _logic; - [QGVAR(modulePatrolArea), [_unit,_position,_radius,5], _unit] call CBA_fnc_targetEvent; + [QGVAR(modulePatrolArea), [_unit, _position, _radius, 5], _unit] call CBA_fnc_targetEvent; deleteVehicle _logic; }; -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_control ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_searchArea.sqf b/addons/zeus/functions/fnc_ui_searchArea.sqf index 9745be7166..197f5c835f 100644 --- a/addons/zeus/functions/fnc_ui_searchArea.sqf +++ b/addons/zeus/functions/fnc_ui_searchArea.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Initalises the `search area` zeus module display + * Initializes the "Search Area" Zeus module display. * * Arguments: * 0: dummy controls group @@ -15,14 +15,14 @@ */ #include "script_component.hpp" -//Generic Init: +// Generic init params ["_control"]; private _display = ctrlParent _control; private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -//Validate the module target: +// Validate module target private _unit = effectiveCommander (attachedTo _logic); scopeName "Main"; @@ -47,36 +47,34 @@ switch (false) do { }; private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - if (_this select 1 == 2) then { - deleteVehicle _logic; - }; + deleteVehicle _logic; }; private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _unit = effectiveCommander (attachedTo _logic); - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); - private _marker = QGVAR(ModuleSearchArea) + str(_unit); + private _radius = GETVAR(_display,GVAR(radius),100); + private _position = getPos _logic; + private _marker = QGVAR(ModuleSearchArea) + str _unit; createMarker [_marker, _position]; _marker setMarkerAlpha 0; _marker setMarkerShape "ELLIPSE"; - _marker setMarkerSize [_radius,_radius]; + _marker setMarkerSize [_radius, _radius]; - [QGVAR(moduleSearchArea), [_unit,_marker], _unit] call CBA_fnc_targetEvent; + [QGVAR(moduleSearchArea), [_unit, _marker], _unit] call CBA_fnc_targetEvent; deleteVehicle _logic; }; -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_control ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_suicideBomber.sqf b/addons/zeus/functions/fnc_ui_suicideBomber.sqf index 13d61ddc63..6ee5c6b0d8 100644 --- a/addons/zeus/functions/fnc_ui_suicideBomber.sqf +++ b/addons/zeus/functions/fnc_ui_suicideBomber.sqf @@ -1,6 +1,6 @@ /* * Author: mharis001 - * Initalizes the "Suicide Bomber" Zeus module display. + * Initializes the "Suicide Bomber" Zeus module display. * * Arguments: * 0: suicideBomber controls group diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index d1daeab775..854d4fad83 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -273,29 +273,16 @@ 更新可编辑的物件 更新可編輯的物件 - - All Curators - Alle Zeus' - 全キュレーター - 모든 큐레이터 - Wszyscy kuratorzy - Tous curateurs - Tutti i Moderatori - 所有编辑者 - 所有編輯者 + + Editing Mode - - Apply changes to all curators - Änderungen bei allen Zeus' aktualisieren - 全キュレーターへ変更を適用 - 모든 큐레이터에 변화를 적용합니다 - Zatwierdź zmiany dla wszystkich kuratorów - Applique les changements à tous les curateurs - Applica i cambiamenti a tutti i moderatori - 确认变更给所有编辑者 - 確認變更給所有編輯者 + + Add or remove editable objects from Zeus - + + Add Objects + + Remove Objects Entferne Objekte オブジェクトの削除 @@ -306,16 +293,27 @@ 移除物件 移除物件 - - Remove existing instead of adding new - Entfernt Bestehendes, statt Neues hinzuzufügen - 新しく追加するために削除します - 물체를 삭제합니다 - Usuń istniejące zamiast dodawać nowe - Enlève les objets existants au lieu d'en ajouter de nouveaux - Rimuove gli esistenti e li sostituisce con i nuovi - 移除已存在的物件来新增新的物件 - 移除已存在的物件來新增新的物件 + + All Curators + Alle Zeus' + 全キュレーター + 모든 큐레이터 + Wszyscy kuratorzy + Tous curateurs + Tutti i Moderatori + 所有编辑者 + 所有編輯者 + + + Apply changes to all curators + Änderungen bei allen Zeus' aktualisieren + 全キュレーターへ変更を適用 + 모든 큐레이터에 변화를 적용합니다 + Zatwierdź zmiany dla wszystkich kuratorów + Applique les changements à tous les curateurs + Applica i cambiamenti a tutti i moderatori + 确认变更给所有编辑者 + 確認變更給所有編輯者 Global AI Skill @@ -963,31 +961,6 @@ 货物: 貨物: - - Task Position - Position de la tâche - Местоположение задания - Pozice úkolu - タスク位置 - Pozycja zadania - Position der Aufgabe - 작업 위치 - Posizione Incarico - 目标位置 - 目標位置 - - - Select a position to perform the task at - Sélectionne une position où accomplir la tâche - Выбрать местоположение для выполнения задания - 次の選択位置をタスクとして実行 - Wybierz pozycję na której wykonać zadanie - Wähle eine Position, an der die Aufgabe ausgeführt werden soll - 작업을 할 위치를 선택하십시요 - Seleziona una posizione per eseguire l'incarico - 选择要执行目标的位置 - 選擇要執行目標的位置 - Task Radius Rayon de la tâche @@ -1000,7 +973,7 @@ 目标半径 目標半徑 - + Radius to perform the task within Rayon dans lequel la tâche prend place Радиус выполнения задания diff --git a/addons/zeus/ui/Icon_Module_Zeus_Editable_Objects_ca.paa b/addons/zeus/ui/Icon_Module_Zeus_Editable_Objects_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..89828a42c5d6a29ebcd575116b65dab5cd4eebbe GIT binary patch literal 5625 zcmeHLUrbw77(e~9g0!@Zp+r~(M%9-g!I3eClcJ`;Cevhg;^M;CCOXHca~s)%q}RC( zjFWEYlsz<<_^|l2g7YrMVH-&pD(-~{Wkp#6i6(Aij0a@ga{SJ{J?FNUHna;PnepTn z?(d#+zTf%&o^$UCTv1W}>I)Uy%e4q0K@c{IxTd_CU<{4mit?9i1gqdj@HU(6Wh>ls z@M}p!s4WAbvkxOQ3ctjf6niaK4!W2<^!xaNK+972Bf9=debQ=d zjbA|sP<@}W;VC>T`zP53_P7wtr2WeIGLBDw1FAe`fs4vpxwomYG|V6Rcgm(ZXD^U$ z(I1dM?G_+eE{x1pqew>iUqNc3BjramP~?){m2t=bWVO-rKQjK6`iG`7d5`7vIfTAR z77rkn3%3{Gi2S(U80wEn@X7Is75Uf(^AH^jT1|Mg#r z`2WxQKhu*M@R(V>T@atk9RH8L$k&zfjyaldk8kK|9w`%QDNZt6ofK}#`$6n{j2{2m zP4koUO^x|fUe-a_+?>HqidCe(SIPUqa{Hg0&$MvS_0TFoab8LB{4-v`NwKQrk~zSq zM)6;C{q-O}{5+FhJL|%KIHsw*l=^R)N4#O@jb--#V)`rX@kH^rLBChXq3hQ&|3%kd z8Q&?J_&wQS=MDX9_*49kBS__~+C7vb%n&3o$Bs9;GKqnXSMn`}6V;!xQoglsc$!DB zaD_aNR{s{`H*Ringr9#>93VODJP7(no<9ue4&f$^$i{}Mi2g*eevQX@*X5k0@>bT9 zyE%6LRqq5S$op|x!6op2u$PXP^}9Fy<@waI(vyYq?@xd7IzGbwnp)HQ{%-j^YgUsQ({2G&K|mt*py^FM^PbX&H_+kB$@nH-6yx>CAcUCsK&@uK=5r@OzZ$8si&IHHRLOYrC;a~J3+|q$^6C$ZQeI)t1R#&jMutCHe$Jx`!r$7}NgX&m* zW;N^~Kg__#FQn<^-4?EZnV}a|sjq)@hNbDxq?&G3KZ$Yn7)fJ|&p6>T-tbYitv`1(^`A8KGjPr@0!{MqB;*9!^jNAVW}I~oRv8$hrs86_j2u(aj= zbnS2@%l52upWXa*?=BO@?n&aSuaV)<(?uOn{j$dh4VbNSyrAQ92&=SEQNf-^G7gQO NJMwuJT`dfS_AjLzx)%Td literal 0 HcmV?d00001 diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 8345904ca9..8af743b897 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -29,67 +29,38 @@ class GVAR(AttributeRadius): RscControlsGroupNoScrollbars { x = 0; y = 0; w = W_PART(26); - h = H_PART(1.2); + h = H_PART(1.1); class controls { - class Title1: RscText { + class Label: RscText { idc = -1; text = CSTRING(AttributeRadius); - toolTip = CSTRING(AttributeRadius_desc); + tooltip = CSTRING(AttributeRadius_Tooltip); x = 0; y = H_PART(0.1); w = W_PART(10); h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; + colorBackground[] = {0, 0, 0, 0.5}; }; class Radius: RscEdit { idc = 26467; x = W_PART(10.1); y = H_PART(0.1); - w = W_PART(15.8); + w = W_PART(15.9); h = H_PART(1); autocomplete = ""; }; }; }; -class GVAR(AttributePosition): RscControlsGroupNoScrollbars { - onSetFocus = QUOTE(_this call FUNC(ui_attributePosition)); - idc = 26468; - x = 0; - y = 0; - w = W_PART(26); - h = H_PART(26); - class controls { - class Title1: RscText { - idc = -1; - text = CSTRING(AttributePosition); - toolTip = CSTRING(AttributePosition_desc); - x = 0; - y = 0; - w = W_PART(26); - h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; - }; - class Position: RscMapControl { - idc = 26469; - x = W_PART(0.5); - y = H_PART(1.1); - w = W_PART(25); - h = H_PART(24.8); - }; - }; -}; - class GVAR(RscDefendArea): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscDefendArea)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscDefendArea)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscDefendArea))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscDefendArea))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; class Content: Content { class Controls { class radius: GVAR(AttributeRadius) {}; - //class position: GVAR(AttributePosition) {}; }; }; class ButtonOK: ButtonOK { @@ -108,40 +79,43 @@ class GVAR(RscEditableObjects): RscDisplayAttributes { class Content: Content { class Controls { class radius: GVAR(AttributeRadius) {}; - //class position: GVAR(AttributePosition) {}; class editableObjects: RscControlsGroupNoScrollbars { onSetFocus = QUOTE(_this call FUNC(ui_editableObjects)); - idc = 26422; + idc = 19180; x = 0; y = 0; - w = W_PART(11.1); - h = H_PART(2.5); + w = W_PART(26); + h = H_PART(2.1); class controls { - class Label: RscText { + class EditingModeLabel: RscText { idc = -1; - text = CSTRING(ModuleEditableObjects_curators); - toolTip = CSTRING(ModuleEditableObjects_curators_desc); + text = CSTRING(ModuleEditableObjects_EditingMode); + tooltip = CSTRING(ModuleEditableObjects_EditingMode_Tooltip); x = 0; y = 0; w = W_PART(10); h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; + colorBackground[] = {0, 0, 0, 0.5}; }; - class AllCurators: RscCheckBox { - idc = 16188; + class EditingMode: ctrlToolbox { + idc = 19181; x = W_PART(10.1); y = 0; - w = W_PART(1); + w = W_PART(15.9); h = H_PART(1); + rows = 1; + columns = 2; + strings[] = {CSTRING(ModuleEditableObjects_RemoveObjects), CSTRING(ModuleEditableObjects_AddObjects)}; }; - class Label2: Label { - text = CSTRING(ModuleEditableObjects_removal); - toolTip = CSTRING(ModuleEditableObjects_removal_desc); + class AllCuratorsLabel: EditingModeLabel { + text = CSTRING(ModuleEditableObjects_AllCurators); + tooltip = CSTRING(ModuleEditableObjects_AllCurators_Tooltip); y = H_PART(1.1); }; - class EditingMode: AllCurators { - idc = 16189; + class AllCurators: EditingMode { + idc = 19182; y = H_PART(1.1); + strings[] = {ECSTRING(common,No), ECSTRING(common,Yes)}; }; }; }; @@ -153,8 +127,8 @@ class GVAR(RscEditableObjects): RscDisplayAttributes { }; class GVAR(RscGlobalSetSkill): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscGlobalSetSkill))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscGlobalSetSkill))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -248,8 +222,8 @@ class GVAR(RscGlobalSetSkill): RscDisplayAttributes { }; class GVAR(RscGroupSide): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGroupSide)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGroupSide)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscGroupSide))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscGroupSide))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -326,15 +300,14 @@ class GVAR(RscGroupSide): RscDisplayAttributes { }; class GVAR(RscPatrolArea): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscPatrolArea)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscPatrolArea)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscPatrolArea))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscPatrolArea))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; class Content: Content { class Controls { class radius: GVAR(AttributeRadius) {}; - //class position: GVAR(AttributePosition) {}; }; }; class ButtonOK: ButtonOK { @@ -345,15 +318,14 @@ class GVAR(RscPatrolArea): RscDisplayAttributes { }; class GVAR(RscSearchArea): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSearchArea)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSearchArea)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscSearchArea))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscSearchArea))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; class Content: Content { class Controls { class radius: GVAR(AttributeRadius) {}; - //class position: GVAR(AttributePosition) {}; }; }; class ButtonOK: ButtonOK { @@ -364,8 +336,8 @@ class GVAR(RscSearchArea): RscDisplayAttributes { }; class GVAR(RscTeleportPlayers): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscTeleportPlayers)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscTeleportPlayers)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscTeleportPlayers))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscTeleportPlayers))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -501,8 +473,8 @@ class RscDisplayAttributesVehicleEmpty: RscDisplayAttributes { }; class GVAR(RscGarrison): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGarrison)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGarrison)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscGarrison))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscGarrison))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -576,8 +548,8 @@ class GVAR(RscGarrison): RscDisplayAttributes { }; class GVAR(RscToggleNvg): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscToggleNvg)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscToggleNvg)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscToggleNvg))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscToggleNvg))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -634,8 +606,8 @@ class GVAR(RscToggleNvg): RscDisplayAttributes { }; class GVAR(RscToggleFlashlight): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscToggleFlashlight)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscToggleFlashlight)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscToggleFlashlight))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscToggleFlashlight))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -700,8 +672,8 @@ class GVAR(RscToggleFlashlight): RscDisplayAttributes { }; class GVAR(RscSetEngineer): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSetEngineer)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSetEngineer)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscSetEngineer))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscSetEngineer))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {}; @@ -745,8 +717,8 @@ class GVAR(RscSetEngineer): RscDisplayAttributes { }; class GVAR(RscSuicideBomber): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSuicideBomber)))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSuicideBomber)))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscSuicideBomber))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscSuicideBomber))] call FUNC(zeusAttributes)); class Controls: Controls { class Background: Background {}; class Title: Title {};