void HandleButtonEvent(ButtonEvent *event)
{
+#if 0
+ printf("::: BUTTON EVENT: button %d %s\n", event->button,
+ event->type == EVENT_BUTTONPRESS ? "pressed" : "released");
+#endif
+
motion_status = FALSE;
if (event->type == EVENT_BUTTONPRESS)
Key key = GetEventKey(event, with_modifiers);
Key keymod = (with_modifiers ? GetEventKey(event, FALSE) : key);
+#if 0
+ printf("::: KEY EVENT: %d %s\n", GetEventKey(event, TRUE),
+ event->type == EVENT_KEYPRESS ? "pressed" : "released");
+#endif
+
HandleKeyModState(keymod, key_status);
HandleKey(key, key_status);
}
if (key_status == KEY_RELEASED)
return;
+ if ((key == KSYM_Return || key == KSYM_KP_Enter) &&
+ (GetKeyModState() & KMOD_Alt) && video.fullscreen_available)
+ {
+ setup.fullscreen = !setup.fullscreen;
+
+ ToggleFullscreenIfNeeded();
+
+ return;
+ }
+
if (game_status == GAME_MODE_PLAYING && AllPlayersGone &&
(key == KSYM_Return || key == setup.shortcut.toggle_pause))
{
+#if 1
+ GameEnd();
+#else
CloseDoor(DOOR_CLOSE_1);
game_status = GAME_MODE_MAIN;
DrawMainMenu();
+#endif
return;
}
if (AllPlayersGone && newbutton)
{
+#if 1
+ GameEnd();
+#else
CloseDoor(DOOR_CLOSE_1);
game_status = GAME_MODE_MAIN;
DrawMainMenu();
+#endif
+
return;
}