From d0a955fef000e26f301c0bbf662ecaf106db80ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Fri, 1 Sep 2023 13:20:44 -0300 Subject: [PATCH] Allow disabling colors for NameAllKeys --- src/common/scripting/interface/vmnatives.cpp | 3 ++- wadsrc/static/zscript/engine/ui/menu/menu.zs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/scripting/interface/vmnatives.cpp b/src/common/scripting/interface/vmnatives.cpp index 3e75e75d8a..cd309f9ccb 100644 --- a/src/common/scripting/interface/vmnatives.cpp +++ b/src/common/scripting/interface/vmnatives.cpp @@ -1038,7 +1038,8 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, NameAllKeys) { PARAM_PROLOGUE; PARAM_POINTER(array, TArray); - 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); } diff --git a/wadsrc/static/zscript/engine/ui/menu/menu.zs b/wadsrc/static/zscript/engine/ui/menu/menu.zs index 1c18770411..e7a9550f4f 100644 --- a/wadsrc/static/zscript/engine/ui/menu/menu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/menu.zs @@ -36,7 +36,7 @@ struct KeyBindings native version("2.4") { native static String NameKeys(int k1, int k2); - native static String NameAllKeys(array list); + native static String NameAllKeys(array list, bool colors = true); native int, int GetKeysForCommand(String cmd); native void GetAllKeysForCommand(out array list, String cmd);