mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[client] overlay: show layout-translated hotkey labels
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Related to #1298
This commit is contained in:
@@ -56,7 +56,11 @@ static int help_render(void * udata, bool interactive, struct Rect * windowRects
|
||||
|
||||
if (igBeginTable("Help", 2, 0, (ImVec2) { 0.0f, 0.0f }, 0.0f))
|
||||
{
|
||||
char escapeLabel[8];
|
||||
const char * escapeName = linux_to_display[g_params.escapeKey];
|
||||
if (g_state.ds->getKeyLabel(
|
||||
g_params.escapeKey, escapeLabel, sizeof(escapeLabel)))
|
||||
escapeName = escapeLabel;
|
||||
|
||||
igTableNextColumn();
|
||||
igText("%s", escapeName);
|
||||
@@ -69,8 +73,13 @@ static int help_render(void * udata, bool interactive, struct Rect * windowRects
|
||||
if (!handle->description)
|
||||
continue;
|
||||
|
||||
char keyLabel[8];
|
||||
const char * keyName = linux_to_display[handle->sc];
|
||||
if (g_state.ds->getKeyLabel(handle->sc, keyLabel, sizeof(keyLabel)))
|
||||
keyName = keyLabel;
|
||||
|
||||
igTableNextColumn();
|
||||
igText("%s+%s", escapeName, linux_to_display[handle->sc]);
|
||||
igText("%s+%s", escapeName, keyName);
|
||||
igTableNextColumn();
|
||||
igTextUnformatted(handle->description, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user