1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Change exit keybinding and fix bug in allow_close[]

This commit is contained in:
Vincent Robinson 2025-04-23 12:41:32 -07:00 committed by GitHub
parent d6d045aad4
commit 233ffbe384
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -57,7 +57,7 @@ Some can be changed in the key config dialog in the settings tab.
| T | Chat | | T | Chat |
| / | Command | | / | Command |
| Esc | Pause menu/abort/exit (pauses only singleplayer game) | | Esc | Pause menu/abort/exit (pauses only singleplayer game) |
| Ctrl + Esc | Exit directly to main menu from anywhere, bypassing pause menu | | Shift + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
| + | Increase view range | | + | Increase view range |
| - | Decrease view range | | - | Decrease view range |
| K | Enable/disable fly mode (needs fly privilege) | | K | Enable/disable fly mode (needs fly privilege) |

View file

@ -151,7 +151,7 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
fullscreen_is_down = event.KeyInput.PressedDown; fullscreen_is_down = event.KeyInput.PressedDown;
return true; return true;
} else if (keyCode == EscapeKey && } else if (keyCode == EscapeKey &&
event.KeyInput.PressedDown && event.KeyInput.Control) { event.KeyInput.PressedDown && event.KeyInput.Shift) {
g_gamecallback->disconnect(); g_gamecallback->disconnect();
return true; return true;
} }

View file

@ -206,7 +206,10 @@ public:
void defaultAllowClose(bool value) void defaultAllowClose(bool value)
{ {
// Also set m_allowclose here in order to have the correct value if
// escape is pressed before regenerateGui() is called.
m_default_allowclose = value; m_default_allowclose = value;
m_allowclose = value;
} }
void setDebugView(bool value) void setDebugView(bool value)