diff --git a/addons/chemical/functions/fnc_AttributeRadius.sqf b/addons/chemical/functions/fnc_AttributeRadius.sqf index 9a1444163..34569a0e4 100644 --- a/addons/chemical/functions/fnc_AttributeRadius.sqf +++ b/addons/chemical/functions/fnc_AttributeRadius.sqf @@ -14,8 +14,8 @@ * */ - params ["_control"]; + private _display = ctrlParent _control; private _logic = missionNamespace getVariable["BIS_fnc_initCuratorAttributes_target",objNull]; _control ctrlRemoveAllEventHandlers "SetFocus"; @@ -28,11 +28,11 @@ if!(isNull attachedTo _logic) then { _sealCheckBox ctrlShow true; _sealText ctrlShow true; - _placeText ctrlSetText CSTRING(GasModule_createContaminatedObject); + _placeText ctrlSetText LLSTRING(GasModule_createContaminatedObject); } else { _sealCheckBox ctrlShow false; _sealText ctrlShow false; - _placetext ctrlSetText CSTRING(GasModule_createContaminatedZone); + _placetext ctrlSetText LLSTRING(GasModule_createContaminatedZone); }; private _gasTypeCombo = _display displayCtrl 1615; diff --git a/addons/chemical/functions/fnc_ui_gasModule.sqf b/addons/chemical/functions/fnc_ui_gasModule.sqf index a51509807..a64cd88e6 100644 --- a/addons/chemical/functions/fnc_ui_gasModule.sqf +++ b/addons/chemical/functions/fnc_ui_gasModule.sqf @@ -18,7 +18,8 @@ params ["_control"]; private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; +private _ctrlButtonOK = _display displayCtrl IDC_OK; +private _ctrlButtonCancel = _display displayCtrl IDC_CANCEL; private _logic = missionNamespace getVariable["BIS_fnc_initCuratorAttributes_target",objNull]; @@ -28,7 +29,17 @@ _control ctrlRemoveAllEventHandlers "SetFocus"; private _fnc_onUnload = { private _logic = missionNamespace getVariable["BIS_fnc_initCuratorAttributes_target",objNull]; if (isNull _logic) exitWith {}; - if !(isNull attachedTo _logic) then {}; + if !(_display getVariable [QGVAR(Confirmed), false]) then + { + if !(isNull attachedTo _logic) then + { + deleteVehicle _logic; + } else + { + detach (attachedTo _logic); + deleteVehicle _logic; + }; + }; }; scopeName "Main"; @@ -85,7 +96,6 @@ private _fnc_onConfirm = { private _logic = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target",objNull]; if (isNull _logic) exitWith {}; - if !(isNull attachedTo _logic) then { private _object = attachedto _logic; private _position = getPos _object; @@ -100,6 +110,8 @@ private _fnc_onConfirm = { private _position = getPos _logic; [_logic,_position,_radius_max,_radius_min,_gastype] call FUNC(gasCheck); }; + + _display setVariable [QGVAR(Confirmed), true]; }; }; diff --git a/addons/chemical/ui/RscAttributes.hpp b/addons/chemical/ui/RscAttributes.hpp index 7ddefabda..58a4d578e 100644 --- a/addons/chemical/ui/RscAttributes.hpp +++ b/addons/chemical/ui/RscAttributes.hpp @@ -114,8 +114,8 @@ class GVAR(kat_RscAtributeRadius): RscControlsGroupNoScrollbars { class GVAR(kat_RscGasModul): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(kat_RscGasModul))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(kat_RscGasModul))] call FUNC(zeusAttributes)); + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(kat_RscGasModul))] call EFUNC(zeus,zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(kat_RscGasModul))] call EFUNC(zeus,zeusAttributes)); class Controls: Controls { class Background: Background {};