From: Holger Schemel Date: Wed, 15 Jun 2022 06:41:52 +0000 (+0200) Subject: added using setup option for displaying overlay touch buttons X-Git-Tag: 4.3.2.2^0 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1d7ec87196d24515b3d6e9400c689d9cd48c49f5;p=rocksndiamonds.git added using setup option for displaying overlay touch buttons --- 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)