-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add key handling to 3DEN attribute (#6622)
- Loading branch information
1 parent
720bb3f
commit 6604868
Showing
8 changed files
with
84 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
class Display3DEN { | ||
class ContextMenu: ctrlMenu { | ||
class Items { | ||
class Arsenal { | ||
items[]= {"aceArsenal", "virtualArsenal"}; | ||
}; | ||
class virtualArsenal { | ||
text = "BI Virtual Arsenal"; | ||
action = QUOTE(['arsenal'] call bis_fnc_3DENEntityMenu); | ||
value = 0; | ||
data = "Arsenal"; | ||
opensNewWindow = 1; | ||
}; | ||
class aceArsenal: virtualArsenal { | ||
text = "ACE Arsenal"; | ||
action = QUOTE(call FUNC(open3DEN)); | ||
}; | ||
}; | ||
}; | ||
class Controls { | ||
class MenuStrip: ctrlMenuStrip { | ||
class Items { | ||
class Tools { | ||
items[] += {"ACE_arsenal_portVALoadouts"}; | ||
}; | ||
class ACE_arsenal_portVALoadouts { | ||
text = CSTRING(portLoadoutsText); | ||
picture = QPATHTOEF(common,data\logo_ace3_ca.paa); | ||
action = "call ace_arsenal_fnc_portVALoadouts;"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include "script_component.hpp" | ||
#include "\a3\ui_f\hpp\defineDIKCodes.inc" | ||
/* | ||
* Author: mharis001 | ||
* Handles keyboard input for the 3DEN attribute. | ||
* | ||
* Arguments: | ||
* 0: Display <DISPLAY> | ||
* 1: Key code <NUMBER> | ||
* | ||
* Return Value: | ||
* Handled <BOOL> | ||
* | ||
* Example: | ||
* [DISPLAY, 0] call ace_arsenal_fnc_attributeKeyDown | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_display", "_keyCode"]; | ||
TRACE_2("Attribute key down",_display,_keyCode); | ||
|
||
// Exit if attribute is not in focus | ||
private _controlsGroup = uiNamespace getVariable QGVAR(attributeFocus); | ||
if (isNil "_controlsGroup") exitWith {false}; | ||
|
||
switch (_keyCode) do { | ||
case DIK_LEFT; | ||
case DIK_NUMPADMINUS: { | ||
[_controlsGroup, false] call FUNC(attributeSelect); | ||
true | ||
}; | ||
case DIK_RIGHT; | ||
case DIK_NUMPADPLUS: { | ||
[_controlsGroup, true] call FUNC(attributeSelect); | ||
true | ||
}; | ||
default {false}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters