added setup option for overlay touch buttons (not used yet)
authorHolger Schemel <info@artsoft.org>
Wed, 15 Jun 2022 06:39:57 +0000 (08:39 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 15 Jun 2022 06:39:57 +0000 (08:39 +0200)
src/files.c
src/libgame/system.h

index 5c8b149d11b38db83fbac390b6c794ed393ada45..8889f810ecaf59d121a62cbf506fb558757c4f9b 100644 (file)
@@ -9661,6 +9661,10 @@ static struct TokenInfo global_setup_tokens[] =
     TYPE_INTEGER,
     &setup.touch.grid_ysize[1],                        "touch.virtual_buttons.1.ysize"
   },
+  {
+    TYPE_SWITCH,
+    &setup.touch.overlay_buttons,              "touch.overlay_buttons"
+  },
 };
 
 static struct TokenInfo auto_setup_tokens[] =
@@ -10401,6 +10405,8 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
 
   si->touch.grid_initialized           = video.initialized;
 
+  si->touch.overlay_buttons            = FALSE;
+
   si->editor.el_boulderdash            = TRUE;
   si->editor.el_emerald_mine           = TRUE;
   si->editor.el_emerald_mine_club      = TRUE;
@@ -10543,6 +10549,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
 
 #if defined(PLATFORM_ANDROID)
   si->fullscreen = TRUE;
+  si->touch.overlay_buttons = TRUE;
 #endif
 
   setHideSetupEntry(&setup.debug.xsn_mode);
index a3d94efd8159d5e7769f4d7f6d5dae55ba03c57f..481290eeba094911a6d7c4579ccaf9df7c9e9d13 100644 (file)
@@ -1309,6 +1309,8 @@ struct SetupTouchInfo
   boolean draw_pressed;
 
   boolean grid_initialized;
+
+  boolean overlay_buttons;
 };
 
 struct SetupInputInfo