mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
General - Cleanup event capitalization (#10062)
This commit is contained in:
parent
9760095c42
commit
898daff7f6
@ -18,7 +18,7 @@
|
||||
(_this select 1) params ["", "_exitCode"];
|
||||
|
||||
[QGVAR(displayClosed), []] call CBA_fnc_localEvent;
|
||||
removeMissionEventHandler ["draw3D", GVAR(camPosUpdateHandle)];
|
||||
removeMissionEventHandler ["Draw3D", GVAR(camPosUpdateHandle)];
|
||||
|
||||
if (is3DEN) then {
|
||||
private _centerOriginParent = objectParent GVAR(centerOrigin);
|
||||
|
@ -278,4 +278,4 @@ showCinemaBorder false;
|
||||
|
||||
//--------------- Reset camera pos
|
||||
[nil, [controlNull, 0, 0]] call FUNC(handleMouse);
|
||||
GVAR(camPosUpdateHandle) = addMissionEventHandler ["draw3D", {call FUNC(updateCamPos)}];
|
||||
GVAR(camPosUpdateHandle) = addMissionEventHandler ["Draw3D", {call FUNC(updateCamPos)}];
|
||||
|
@ -63,7 +63,7 @@ _target switchMove "amovpercmstpslowwrfldnon";
|
||||
_target setVariable ["origin", _position];
|
||||
|
||||
// When killed, respawn AI
|
||||
_target addEventHandler ["killed", {
|
||||
_target addEventHandler ["Killed", {
|
||||
params ["_target"];
|
||||
|
||||
// Killed may fire twice, 2nd will be null - https://github.com/acemod/ACE3/pull/7561
|
||||
|
@ -137,11 +137,11 @@ if (_onCancel isEqualTo {}) then {
|
||||
ctrlSetFocus _ctrlButtonCancel;
|
||||
};
|
||||
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonClick", {(ctrlParent (_this select 0)) closeDisplay 1; true}];
|
||||
_ctrlButtonCancel ctrlAddEventHandler ["buttonClick", {(ctrlParent (_this select 0)) closeDisplay 2; true}];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", {(ctrlParent (_this select 0)) closeDisplay 1; true}];
|
||||
_ctrlButtonCancel ctrlAddEventHandler ["ButtonClick", {(ctrlParent (_this select 0)) closeDisplay 2; true}];
|
||||
|
||||
GVAR(errorOnOK) = _onOK;
|
||||
GVAR(errorOnCancel) = _onCancel;
|
||||
|
||||
_display displayAddEventHandler ["unload", {call ([{}, GVAR(errorOnOK), GVAR(errorOnCancel)] select (_this select 1))}];
|
||||
_display displayAddEventHandler ["keyDown", {_this select 1 == 1}];
|
||||
_display displayAddEventHandler ["Unload", {call ([{}, GVAR(errorOnOK), GVAR(errorOnCancel)] select (_this select 1))}];
|
||||
_display displayAddEventHandler ["KeyDown", {_this select 1 == 1}];
|
||||
|
@ -50,7 +50,7 @@ ctrlMapAnimCommit _map;
|
||||
|
||||
// add drawEH to draw markers next update (they will get drawn 3 times total)
|
||||
_map setVariable ["markers", _markers];
|
||||
_map ctrlAddEventHandler ["draw", {
|
||||
_map ctrlAddEventHandler ["Draw", {
|
||||
params ["_map"];
|
||||
private _markers = _map getVariable ["markers", []];
|
||||
TRACE_2("drawing markers",_map,count _markers);
|
||||
|
@ -28,7 +28,7 @@ TRACE_6("handleVehicleDamage",_vehicle,_hitPoint,_hitIndex,_injurer,_oldDamage,_
|
||||
if !(alive _vehicle) exitWith {
|
||||
private _eventHandler = _vehicle getVariable[QGVAR(handleDamage), nil];
|
||||
if !(isNil "_eventHandler") then {
|
||||
_vehicle removeEventHandler ["handleDamage", _eventHandler];
|
||||
_vehicle removeEventHandler ["HandleDamage", _eventHandler];
|
||||
};
|
||||
LOG_1("Vehicle [%1] no longer alive",_vehicle);
|
||||
true
|
||||
|
@ -5,7 +5,7 @@
|
||||
// cannot create checkboxes which have the default value "true"
|
||||
// 3den uses inverted checkboxes instead, but those only change in appearence
|
||||
// we have to auto set these settings manually - on mission creation
|
||||
add3DENEventHandler ["onMissionNew", {
|
||||
add3DENEventHandler ["OnMissionNew", {
|
||||
set3DENMissionAttributes [
|
||||
["Intel", "IntelWavesIsForced", true],
|
||||
["Intel", "IntelWindIsForced", true]
|
||||
|
@ -113,9 +113,9 @@ GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw",
|
||||
} else {
|
||||
TRACE_4("cleaning up",_this select 1,GVAR(moduleDestination_displayEHMouse),GVAR(moduleDestination_displayEHKeyboard),GVAR(moduleDestination_mapDrawEH));
|
||||
(_this select 1) call CBA_fnc_removePerFrameHandler;
|
||||
(findDisplay 312) displayRemoveEventHandler ["mouseButtonDown", GVAR(moduleDestination_displayEHMouse)];
|
||||
(findDisplay 312) displayRemoveEventHandler ["MouseButtonDown", GVAR(moduleDestination_displayEHMouse)];
|
||||
(findDisplay 312) displayRemoveEventHandler ["KeyDown", GVAR(moduleDestination_displayEHKeyboard)];
|
||||
((findDisplay 312) displayCtrl 50) ctrlRemoveEventHandler ["draw", GVAR(moduleDestination_mapDrawEH)];
|
||||
((findDisplay 312) displayCtrl 50) ctrlRemoveEventHandler ["Draw", GVAR(moduleDestination_mapDrawEH)];
|
||||
GVAR(moduleDestination_displayEHMouse) = nil;
|
||||
GVAR(moduleDestination_displayEHKeyboard) = nil;
|
||||
GVAR(moduleDestination_mapDrawEH) = nil;
|
||||
|
@ -24,7 +24,7 @@ private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||
TRACE_1("logicObject",_logic);
|
||||
|
||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
||||
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||
|
||||
//Specific on-load stuff:
|
||||
private _fnc_sliderMove = {
|
||||
@ -74,5 +74,5 @@ private _fnc_onConfirm = {
|
||||
[QGVAR(GlobalSkillAI),GVAR(GlobalSkillAI)] call FUNC(moduleGlobalSetSkill);
|
||||
};
|
||||
|
||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];
|
||||
_display displayAddEventHandler ["Unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm];
|
||||
|
@ -24,7 +24,7 @@ private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||
TRACE_1("logicObject",_logic);
|
||||
|
||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
||||
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||
|
||||
//Validate the module target:
|
||||
private _unit = effectiveCommander (attachedTo _logic);
|
||||
@ -101,7 +101,7 @@ private _fnc_onSelection = {
|
||||
|
||||
_ctrl ctrlSetTextColor _color;
|
||||
|
||||
_ctrl ctrlAddEventHandler ["buttonclick", _fnc_onSelection];
|
||||
_ctrl ctrlAddEventHandler ["ButtonClick", _fnc_onSelection];
|
||||
} forEach IDCs;
|
||||
|
||||
private _fnc_onUnload = {
|
||||
@ -129,5 +129,5 @@ private _fnc_onConfirm = {
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
|
||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];
|
||||
_display displayAddEventHandler ["Unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm];
|
||||
|
@ -23,7 +23,7 @@ private _ctrlButtonOK = _display displayCtrl 1; // IDC_OK
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||
TRACE_1("logicObject",_logic);
|
||||
|
||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
||||
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||
|
||||
// Validate module target
|
||||
private _unit = attachedTo _logic;
|
||||
|
@ -23,7 +23,7 @@ private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||
TRACE_1("logicObject",_logic);
|
||||
|
||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
||||
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||
|
||||
//Specific on-load stuff:
|
||||
private _listbox = _display displayCtrl 16189;
|
||||
@ -91,5 +91,5 @@ private _fnc_onConfirm = {
|
||||
};
|
||||
|
||||
_display displayAddEventHandler ["KeyUp", _fnc_onKeyUp];
|
||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];
|
||||
_display displayAddEventHandler ["Unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm];
|
||||
|
Loading…
Reference in New Issue
Block a user