-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remake keybinding ui and add mouse support #638
Conversation
[
"Test Category",
"Test",
["key action name", "key action tooltip"],
{systemChat str 1},
{systemChat str 2},
[15, [false, false, false]]
] call cba_fnc_addKeybind; |
f57b534
to
5952b77
Compare
note:
|
addons/keybinding/fnc_addKeybind.sqf
Outdated
// data for controls menu | ||
if (isNil QGVAR(actions)) then { | ||
GVAR(actions) = [] call CBA_fnc_createNamespace; | ||
//GVAR(keys) = [] call CBA_fnc_createNamespace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's all still experimental and wip.
Part of this went into #656, so this PR can eventually only change the gui and not |
5952b77
to
8b5a0fb
Compare
done |
ACE uses -1 for some unbound keys
throws
|
@@ -92,6 +92,8 @@ if (_defaultKeybind isEqualTypeParams [0, false, false, false]) then { | |||
_defaultKeybind params [["_defaultKey", 0, [0]], ["_defaultModifiers", [], [[]]]]; | |||
_defaultModifiers params [["_defaultShift", false, [false]], ["_defaultControl", false, [false]], ["_defaultAlt", false, [false]]]; | |||
|
|||
_defaultKey = _defaultKey max 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about big numbers?
min 254
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would anyone use these?
[0xF8, 0x100004], // Mouse wheel up | ||
[0xF9, 0x100005], // Mouse wheel down | ||
[84, DIK_SYSRQ], | ||
[198, DIK_PAUSE] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt+Print and Ctrl+Pause leads to UNEXPECTED_KEY, even in vanilla, but this makes them display the right key.
9b6dc1a
to
c48c26d
Compare
1a075ff
to
9545ccb
Compare
remember last selected addon in keybinding ui
* Mouse support for CBA_fnc_addKeyHandler (#651) * use last possible single key as array size * delete superfluous check, fix header * roll less, but bigger numbers to generate random hashkey * header formatting * only compile functions on machines with interface * add mission display ui events directly on display init * rename display load functions for naming conventions * prepare mouse handers in zeus display * fix issues with blocking key events * isEqualTo for maximum performance :S * fix no return value making blocking undefined * simplify * better variable name * remove a superfluous check * add a comment to seperate key handler code from other stuff * add support for mouse keys and the scroll wheel * add mouse button translations (#652) * add mouse button translations to custom dik codes * fix keyHandler becoming unremovable if added to two different keys (#653) * fix keyHandler becoming unremovable if added two different keys * fix strange modifier key behavior (#654) * fix strange modifier key behaviour * disable modifier state in keyDown if released * squash-CBA_fnc_addKeybind-redo (#656) * fix a script error * add function to translate keys * joinString * fix rebinding would delete default keyup handler * CfgFunctions * display multiple keybinds in diary * fix for travis * remake keybinding ui and add mouse support (#638) * remake rebinding ui for mouse support * remember last selected addon in keybinding ui
When merged this pull request will:
Also has all the features the vanilla keybinding ui has. Undo, Delete, Default, Next, Prev and they all do exactly the same.