Save console key

This commit is contained in:
Agent X 2023-12-06 20:03:40 -05:00
parent bdccde902e
commit 3a18f41637
2 changed files with 5 additions and 2 deletions

View file

@ -204,6 +204,7 @@ static const struct ConfigOption options[] = {
{.name = "key_prev", .type = CONFIG_TYPE_BIND, .uintValue = configKeyPrevPage},
{.name = "key_next", .type = CONFIG_TYPE_BIND, .uintValue = configKeyNextPage},
{.name = "key_disconnect", .type = CONFIG_TYPE_BIND, .uintValue = configKeyDisconnect},
{.name = "key_console", .type = CONFIG_TYPE_BIND, .uintValue = configKeyConsole},
{.name = "stick_deadzone", .type = CONFIG_TYPE_UINT, .uintValue = &configStickDeadzone},
{.name = "rumble_strength", .type = CONFIG_TYPE_UINT, .uintValue = &configRumbleStrength},
{.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableCamera},

View file

@ -199,8 +199,10 @@ bool djui_interactable_on_key_down(int scancode) {
return true;
}
for (int i = 0; i < MAX_BINDS; i++) {
if (scancode == (int)configKeyConsole[i]) { djui_console_toggle(); }
if (!gDjuiChatBoxFocus && gDjuiChatBox != NULL) {
for (int i = 0; i < MAX_BINDS; i++) {
if (scancode == (int)configKeyConsole[i]) { djui_console_toggle(); break; }
}
}
bool keyFocused = (gInteractableFocus != NULL)