int ly = getLevelFromScreenY(my);
int new_button = (!local_player->mouse_action.button && button);
+ if (local_player->mouse_action.button_hint)
+ button = local_player->mouse_action.button_hint;
+
ClearPlayerMouseAction();
if (!IN_GFX_FIELD_PLAY(mx, my) || !IN_LEV_FIELD(lx, ly))
if (new_display_width != video.display_width ||
new_display_height != video.display_height)
{
+ int nr = GRID_ACTIVE_NR(); // previous screen orientation
+
video.display_width = new_display_width;
video.display_height = new_display_height;
SDLSetScreenProperties();
+
+ // check if screen orientation has changed (should always be true here)
+ if (nr != GRID_ACTIVE_NR())
+ {
+ int x, y;
+
+ if (game_status == GAME_MODE_SETUP)
+ {
+ // save active virtual buttons (in case of just configuring them)
+ for (x = 0; x < MAX_GRID_XSIZE; x++)
+ for (y = 0; y < MAX_GRID_YSIZE; y++)
+ overlay.grid_button_all[nr][x][y] = overlay.grid_button[x][y];
+ }
+
+ nr = GRID_ACTIVE_NR();
+
+ overlay.grid_xsize = overlay.grid_xsize_all[nr];
+ overlay.grid_ysize = overlay.grid_ysize_all[nr];
+
+ for (x = 0; x < MAX_GRID_XSIZE; x++)
+ for (y = 0; y < MAX_GRID_YSIZE; y++)
+ overlay.grid_button[x][y] = overlay.grid_button_all[nr][x][y];
+ }
}
}
#endif
return;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
+ {
+ if (strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF))
+ local_player->mouse_action.button_hint =
+ (event->type == EVENT_FINGERRELEASE ? MB_NOT_PRESSED :
+ event->x < 0.5 ? MB_LEFTBUTTON :
+ event->x > 0.5 ? MB_RIGHTBUTTON :
+ MB_NOT_PRESSED);
+
return;
+ }
if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
HandleFingerEvent_VirtualButtons(event);