Skip to content

Commit

Permalink
Merge pull request #1667 from CBATeam/hevents
Browse files Browse the repository at this point in the history
General - Cleanup event capitalization
  • Loading branch information
PabstMirror authored Jun 11, 2024
2 parents 441d937 + 9c1b977 commit ad0b3c6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addons/keybinding/fnc_gui_editKey.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ _ctrlButtonUndo ctrlAddEventHandler ["ButtonClick", {
}];

// --- update parent display if this one is closed
_display displayAddEventHandler ["unload", {
_display displayAddEventHandler ["Unload", {
[] call FUNC(gui_update);
}];

Expand Down
4 changes: 2 additions & 2 deletions addons/ui/flexiMenu/fnc_list.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ private _menuDefs = _this call FUNC(getMenuDef);
// replace primary menu's key EH and menuDefs with same key EH but using secondary menu's menuDefs

private _disp = uiNamespace getVariable QGVAR(display);
_disp displayRemoveEventHandler ["keyDown", GVAR(keyDownEHID)];
_disp displayRemoveEventHandler ["KeyDown", GVAR(keyDownEHID)];
params ["", "_menuSources"];

GVAR(keyDownEHID) = _disp displayAddEventHandler ["keyDown",
GVAR(keyDownEHID) = _disp displayAddEventHandler ["KeyDown",
format ["[_this, [%1, %2]] call %3", QGVAR(target), _menuSources, QUOTE(FUNC(menuShortcut))]];

private _caption = if (count (_menuDefs select 0) > _flexiMenu_menuProperty_ID_menuDesc) then {_menuDefs select 0 select _flexiMenu_menuProperty_ID_menuDesc} else {""};
Expand Down
4 changes: 2 additions & 2 deletions addons/ui/flexiMenu/fnc_menu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ IfCountDefault(_caption,(_menuDefs select 0),_flexiMenu_menuProperty_ID_menuDesc
(_disp displayCtrl _flexiMenu_IDC_listMenuDesc) ctrlShow false;

_menuSources = _this select 1;
GVAR(keyDownEHID) = _disp displayAddEventHandler ["keyDown", format ["[_this, [%1, %2]] call %3", QGVAR(target), _menuSources, QUOTE(FUNC(menuShortcut))]];
GVAR(keyDownEHID) = _disp displayAddEventHandler ["KeyDown", format ["[_this, [%1, %2]] call %3", QGVAR(target), _menuSources, QUOTE(FUNC(menuShortcut))]];

_disp displayAddEventHandler ["mouseButtonDown", format ["_this call %1", QUOTE(FUNC(mouseButtonDown))]];
_disp displayAddEventHandler ["MouseButtonDown", format ["_this call %1", QUOTE(FUNC(mouseButtonDown))]];

_idcIndex = 0;

Expand Down
2 changes: 1 addition & 1 deletion addons/ui/fnc_initDisplayInventory.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ _vestItems setVariable [QGVAR(containerType), "VEST_CONTAINER"];
_backpackItems setVariable [QGVAR(containerType), "BACKPACK_CONTAINER"];

{
_x ctrlAddEventHandler ["lbDblClick", {
_x ctrlAddEventHandler ["LBDblClick", {
params ["_control", "_index"];
private _unit = call CBA_fnc_currentUnit;

Expand Down
2 changes: 1 addition & 1 deletion addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private _fnc_storeMapMissions = {_this spawn {isNil { // delay a frame
}}};

_ctrlMaps call _fnc_storeMapMissions;
_ctrlMaps ctrlAddEventHandler ["lbSelChanged", _fnc_storeMapMissions];
_ctrlMaps ctrlAddEventHandler ["LBSelChanged", _fnc_storeMapMissions];

// filter out missions we don't want
_display setVariable [QFUNC(filter), {
Expand Down
2 changes: 1 addition & 1 deletion addons/xeh/fnc_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if !(ISINITIALIZED(_this)) then {
};

// fix for respawnVehicle clearing the object namespace
_this addEventHandler ["respawn", {
_this addEventHandler ["Respawn", {
params ["_vehicle", "_wreck"];

if (ISINITIALIZED(_vehicle)) exitWith {}; // Exit if unit respawned normaly with copied variables (e.g. humans)
Expand Down

0 comments on commit ad0b3c6

Please sign in to comment.