Skip to content

Commit

Permalink
Merge pull request #206 from CBATeam/keybinds_in_zeus
Browse files Browse the repository at this point in the history
add keyhandlers to zeus interface, fix #33
  • Loading branch information
Killswitch00 committed Dec 4, 2015
2 parents fdc7394 + ec49a38 commit 437cd89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addons/events/XEH_preClientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ FUNC(attach_handler) = {
["KeyUp", QUOTE(UP call FUNC(keyHandler))] call (uiNamespace getVariable "CBA_fnc_addDisplayHandler");
["KeyDown", QUOTE(DOWN call FUNC(keyHandler))] call (uiNamespace getVariable "CBA_fnc_addDisplayHandler");

// add keyhandlers to zeus interface
["CBA_curatorOpened", {
params ["_display"];
_display displayAddEventHandler ["KeyUp", {UP call FUNC(keyHandler)}];
_display displayAddEventHandler ["KeyDown", {DOWN call FUNC(keyHandler)}];
}] call CBA_fnc_addEventHandler;

SLX_XEH_STR spawn {
waitUntil { !isNull (findDisplay 46) };
// Workaround for Single Player, mission editor, or mission, preview/continue, whatever, adding double handlers
Expand Down
5 changes: 5 additions & 0 deletions addons/keybinding/gui/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,8 @@ class RscDisplayConfigure {
};
};
};

class RscDisplayCurator {
onLoad = "['CBA_curatorOpened', _this] call CBA_fnc_localEvent; [""onLoad"",_this,""RscDisplayCurator"",'CuratorDisplays'] call (uinamespace getvariable 'BIS_fnc_initDisplay')";
onUnload = "['CBA_curatorClosed', _this] call CBA_fnc_localEvent; [""onUnload"",_this,""RscDisplayCurator"",'CuratorDisplays'] call (uinamespace getvariable 'BIS_fnc_initDisplay')";
};

0 comments on commit 437cd89

Please sign in to comment.