File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ Some can be changed in the key config dialog in the settings tab.
57
57
| T | Chat |
58
58
| / | Command |
59
59
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
60
- | Ctrl + Esc | Exit directly to main menu when within GUI |
60
+ | Ctrl + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
61
61
| + | Increase view range |
62
62
| - | Decrease view range |
63
63
| K | Enable/disable fly mode (needs fly privilege) |
Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
148
148
}
149
149
fullscreen_is_down = event.KeyInput .PressedDown ;
150
150
return true ;
151
+ } else if (keyCode == EscapeKey &&
152
+ event.KeyInput .PressedDown && event.KeyInput .Control ) {
153
+ g_gamecallback->disconnect ();
154
+ return true ;
151
155
}
152
156
}
153
157
@@ -166,6 +170,7 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
166
170
// Remember whether each key is down or up
167
171
if (event.EventType == irr::EET_KEY_INPUT_EVENT) {
168
172
KeyPress keyCode (event.KeyInput );
173
+
169
174
if (setKeyDown (keyCode, event.KeyInput .PressedDown ))
170
175
return true ;
171
176
} else if (g_touchcontrols && event.EventType == irr::EET_TOUCH_INPUT_EVENT) {
Original file line number Diff line number Diff line change @@ -4025,16 +4025,11 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
4025
4025
{
4026
4026
if (event.EventType ==EET_KEY_INPUT_EVENT) {
4027
4027
KeyPress kp (event.KeyInput );
4028
- if (event.KeyInput .PressedDown ) {
4029
- if (kp == EscapeKey && event.KeyInput .Control ) {
4030
- m_text_dst->gotText (L" MenuQuit" );
4031
- g_gamecallback->disconnect ();
4032
- return true ;
4033
- } else if (kp == EscapeKey ||
4034
- (m_client != nullptr && kp == getKeySetting (" keymap_inventory" ))) {
4035
- tryClose ();
4036
- return true ;
4037
- }
4028
+ if (event.KeyInput .PressedDown && (
4029
+ (kp == EscapeKey) ||
4030
+ ((m_client != NULL ) && (kp == getKeySetting (" keymap_inventory" ))))) {
4031
+ tryClose ();
4032
+ return true ;
4038
4033
}
4039
4034
4040
4035
if (m_client != NULL && event.KeyInput .PressedDown &&
You can’t perform that action at this time.
0 commit comments