projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added code for overlay touch buttons (currently not used)
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 6054f74097006ca8d9b0140424f867b71b173da2..32f7177964af22b746b8c6727cd23d207f96a5da 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-653,6
+653,7
@@
void HandleWindowEvent(WindowEvent *event)
video.display_height = new_display_height;
SDLSetScreenProperties();
video.display_height = new_display_height;
SDLSetScreenProperties();
+ SetGadgetsPosition_OverlayTouchButtons();
// check if screen orientation has changed (should always be true here)
if (nr != GRID_ACTIVE_NR())
// check if screen orientation has changed (should always be true here)
if (nr != GRID_ACTIVE_NR())
@@
-1684,6
+1685,10
@@
void HandleButton(int mx, int my, int button, int button_nr)
// always recognize potentially releasing already pressed gadgets
if (button == MB_RELEASED)
handle_gadgets = TRUE;
// always recognize potentially releasing already pressed gadgets
if (button == MB_RELEASED)
handle_gadgets = TRUE;
+
+ // always recognize pressing or releasing overlay touch buttons
+ if (CheckPosition_OverlayTouchButtons(mx, my, button) && !motion_status)
+ handle_gadgets = TRUE;
#endif
if (HandleGlobalAnimClicks(mx, my, button, FALSE))
#endif
if (HandleGlobalAnimClicks(mx, my, button, FALSE))