Skip to content

Commit

Permalink
Allow disabling colors for NameAllKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Sep 1, 2023
1 parent 7fee89d commit 8017c46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common/scripting/interface/vmnatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,8 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, NameAllKeys)
{
PARAM_PROLOGUE;
PARAM_POINTER(array, TArray<int>);
auto buffer = C_NameKeys(array->Data(), array->Size(), true);
PARAM_BOOL(color);
auto buffer = C_NameKeys(array->Data(), array->Size(), color);
ACTION_RETURN_STRING(buffer);
}

Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/engine/ui/menu/menu.zs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
struct KeyBindings native version("2.4")
{
native static String NameKeys(int k1, int k2);
native static String NameAllKeys(array<int> list);
native static String NameAllKeys(array<int> list, bool colors = true);

native int, int GetKeysForCommand(String cmd);
native void GetAllKeysForCommand(out array<int> list, String cmd);
Expand Down

0 comments on commit 8017c46

Please sign in to comment.