mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-27 05:40:51 +00:00
- script update for key bindings.
This commit is contained in:
parent
7be2d44108
commit
4790773ec2
2 changed files with 8 additions and 5 deletions
|
@ -2,8 +2,11 @@
|
||||||
struct KeyBindings native version("2.4")
|
struct KeyBindings native version("2.4")
|
||||||
{
|
{
|
||||||
native static String NameKeys(int k1, int k2);
|
native static String NameKeys(int k1, int k2);
|
||||||
|
native static String NameAllKeys(array<int> list);
|
||||||
|
|
||||||
native int, int GetKeysForCommand(String cmd);
|
native int, int GetKeysForCommand(String cmd);
|
||||||
|
native void GetAllKeysForCommand(out array<int> list, String cmd);
|
||||||
|
|
||||||
native void SetBind(int key, String cmd);
|
native void SetBind(int key, String cmd);
|
||||||
native void UnbindACommand (String str);
|
native void UnbindACommand (String str);
|
||||||
}
|
}
|
||||||
|
|
|
@ -506,10 +506,10 @@ class OptionMenuItemControlBase : OptionMenuItem
|
||||||
(selected ? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor));
|
(selected ? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor));
|
||||||
|
|
||||||
String description;
|
String description;
|
||||||
int Key1, Key2;
|
Array<int> keys;
|
||||||
|
|
||||||
[Key1, Key2] = mBindings.GetKeysForCommand(mAction);
|
mBindings.GetAllKeysForCommand(keys, mAction);
|
||||||
description = KeyBindings.NameKeys (Key1, Key2);
|
description = KeyBindings.NameAllKeys(keys);
|
||||||
if (description.Length() > 0)
|
if (description.Length() > 0)
|
||||||
{
|
{
|
||||||
drawValue(indent, y, Font.CR_WHITE, description);
|
drawValue(indent, y, Font.CR_WHITE, description);
|
||||||
|
|
Loading…
Reference in a new issue