mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- "fixed" keybinding not responding for all keys.
This looks like an ImGui bug - it doesn't like two identically labelled buttons on the same page, it seems. I now work around this by using strings with different numbers of spaces. Stupid but effective.
This commit is contained in:
parent
def63209be
commit
619a7541f1
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@ bool ShowOptionMenu()
|
|||
ImGui::End();
|
||||
return false;
|
||||
}
|
||||
FString emptiness = " ";
|
||||
|
||||
for (int i = 0; i < NUMGAMEFUNCTIONS; i++)
|
||||
{
|
||||
|
@ -58,6 +59,9 @@ bool ShowOptionMenu()
|
|||
al = buttonMap.GetButtonName(i);
|
||||
auto binds = Bindings.GetKeysForCommand(cmd);
|
||||
al = C_NameKeys(binds.Data(), binds.Size());
|
||||
// This looks like an ImGui bug - it doesn't like two identically labelled buttons on the same page, it seems.
|
||||
// Work around this by using strings with different numbers of spaces. Stupid but effective.
|
||||
if (al.IsEmpty()) { al = emptiness; emptiness << " "; }
|
||||
if (ImGui::Button(al, ImVec2(450 * scale, 0)))
|
||||
{
|
||||
activeCommand = cmd;
|
||||
|
|
Loading…
Reference in a new issue