Skip to content
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

add function to translate keys #673

Merged
merged 2 commits into from
May 13, 2017
Merged

add function to translate keys #673

merged 2 commits into from
May 13, 2017

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented May 8, 2017

When merged this pull request will:

  • title

This is used in help and in keybinding, so might as well put it in a function.

15 call CBA_fnc_localizeKey
"Tab"

[15, true, false, false] call CBA_fnc_localizeKey
"Shift+Tab"

[15, [false, true, true]] call CBA_fnc_localizeKey
"Ctrl+Alt+Tab"

@commy2 commy2 added this to the 3.4 milestone May 8, 2017
@commy2 commy2 self-assigned this May 11, 2017

// Build the full key combination name.
if (_alt && {!(_key in [DIK_LMENU, DIK_RMENU])}) then {
_keyName = localize "str_dik_alt" + "+" + _keyName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally minor, but is [localize "bla", _keyName] joinString "+" a faster method for these modifier keys?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also append them all to an array and then joinString at the end

@Killswitch00 Killswitch00 merged commit ec5a3cb into keybinding May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants