mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +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")
|
||||
{
|
||||
native static String NameKeys(int k1, int k2);
|
||||
native static String NameAllKeys(array<int> list);
|
||||
|
||||
native int, int GetKeysForCommand(String cmd);
|
||||
native void GetAllKeysForCommand(out array<int> list, String cmd);
|
||||
|
||||
native void SetBind(int key, String cmd);
|
||||
native void UnbindACommand (String str);
|
||||
}
|
||||
|
|
|
@ -502,14 +502,14 @@ class OptionMenuItemControlBase : OptionMenuItem
|
|||
//=============================================================================
|
||||
override int Draw(OptionMenuDescriptor desc, int y, int indent, bool selected)
|
||||
{
|
||||
drawLabel(indent, y, mWaiting? OptionMenuSettings.mFontColorHighlight:
|
||||
(selected? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor));
|
||||
drawLabel(indent, y, mWaiting ? OptionMenuSettings.mFontColorHighlight :
|
||||
(selected ? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor));
|
||||
|
||||
String description;
|
||||
int Key1, Key2;
|
||||
Array<int> keys;
|
||||
|
||||
[Key1, Key2] = mBindings.GetKeysForCommand(mAction);
|
||||
description = KeyBindings.NameKeys (Key1, Key2);
|
||||
mBindings.GetAllKeysForCommand(keys, mAction);
|
||||
description = KeyBindings.NameAllKeys(keys);
|
||||
if (description.Length() > 0)
|
||||
{
|
||||
drawValue(indent, y, Font.CR_WHITE, description);
|
||||
|
|
Loading…
Reference in a new issue