added using setup option for displaying overlay touch buttons 4.3.2.2
authorHolger Schemel <info@artsoft.org>
Wed, 15 Jun 2022 06:41:52 +0000 (08:41 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 15 Jun 2022 06:41:52 +0000 (08:41 +0200)
src/game.c
src/screens.c
src/tools.c

index 68fb40c6e12dc3c2c27433c0955fb5ea7a4e086a..abf350ce93311d668bc344cc1301affb90fa0a1e 100644 (file)
@@ -16300,9 +16300,8 @@ void CreateGameButtons(void)
     int y = (is_touch_button ? pos->y : GDI_ACTIVE_POS(pos->y));
     int id = i;
 
-    // do not use touch buttons if touch controls are disabled
-    if (is_touch_button &&
-       strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF))
+    // do not use touch buttons if overlay touch buttons are disabled
+    if (is_touch_button && !setup.touch.overlay_buttons)
       continue;
 
     if (gfx->bitmap == NULL)
index 98c7b68ace401ba8fd957d093e854df88b90b466..b45e99119d3e7c5e163fd23cfff625fd5807db70 100644 (file)
@@ -9745,9 +9745,8 @@ static void CreateScreenMenubuttons(void)
     int type = GD_TYPE_NORMAL_BUTTON;
     boolean checked = FALSE;
 
-    // do not use touch buttons if touch controls are disabled
-    if (is_touch_button &&
-       strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF))
+    // do not use touch buttons if overlay touch buttons are disabled
+    if (is_touch_button && !setup.touch.overlay_buttons)
       continue;
 
     event_mask = menubutton_info[i].event_mask;
index 912b18360309377682654e9b9d831604eaaf0005..79cf0885135681310694fdc4dc562fd40dfa5cf0 100644 (file)
@@ -5857,9 +5857,8 @@ void CreateToolButtons(void)
     int y = pos->y;
     int id = i;
 
-    // do not use touch buttons if touch controls are disabled
-    if (is_touch_button &&
-       strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF))
+    // do not use touch buttons if overlay touch buttons are disabled
+    if (is_touch_button && !setup.touch.overlay_buttons)
       continue;
 
     if (global.use_envelope_request && !is_touch_button)