From 1d7ec87196d24515b3d6e9400c689d9cd48c49f5 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 15 Jun 2022 08:41:52 +0200 Subject: [PATCH] added using setup option for displaying overlay touch buttons --- src/game.c | 5 ++--- src/screens.c | 5 ++--- src/tools.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/game.c b/src/game.c index 68fb40c6..abf350ce 100644 --- a/src/game.c +++ b/src/game.c @@ -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) diff --git a/src/screens.c b/src/screens.c index 98c7b68a..b45e9911 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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; diff --git a/src/tools.c b/src/tools.c index 912b1836..79cf0885 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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) -- 2.34.1