added options for player selection button positions in setup menu
authorHolger Schemel <info@artsoft.org>
Tue, 17 Sep 2019 09:20:41 +0000 (11:20 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 17 Sep 2019 09:20:41 +0000 (11:20 +0200)
build-scripts/create_element_defs.pl
src/conf_gfx.c
src/main.h
src/screens.c

index 90749c425a4adecf8f3cf0b0b1d0ecf3e10e89e5..10280faa5ad6a00f6feb239d2cbafb7f7d1dc08c 100755 (executable)
@@ -2360,6 +2360,7 @@ sub print_image_config_vars
            # --- some prefix replacements ---
 
            $var =~ s/^main\./menu.main./;
+           $var =~ s/^setup\./menu.setup./;
            $var =~ s/^\[player\]\./game.player_/;
            $var =~ s/^\[title_initial\]/title_initial_default/;
            $var =~ s/^\[title\]/title_default/;
index 5075ee37cd2cccf182e39ca35cc55f14c2ccd022..6c1a6ba2ef9e35bb469daca99bb93e4ae8bc06c5 100644 (file)
@@ -8087,6 +8087,11 @@ struct ConfigInfo image_config[] =
   { "main.preview_players.xoffset",            "-1"                    },
   { "main.preview_players.yoffset",            "-1"                    },
 
+  { "setup.button.prev_player.x",              "320"                   },
+  { "setup.button.prev_player.y",              "64"                    },
+  { "setup.button.next_player.x",              "384"                   },
+  { "setup.button.next_player.y",              "64"                    },
+
   { "preview.x",                               "272"                   },
   { "preview.y",                               "380"                   },
   { "preview.align",                           "center"                },
index 869e5ba5095704ef9937e1f5c47e5d771b498816..88577ac27add45a3315bb7ee3e06e5d825640b5b 100644 (file)
@@ -2719,6 +2719,17 @@ struct MenuMainInfo
   struct TextPosInfo network_players;
 };
 
+struct MenuSetupButtonInfo
+{
+  struct MenuPosInfo prev_player;
+  struct MenuPosInfo next_player;
+};
+
+struct MenuSetupInfo
+{
+  struct MenuSetupButtonInfo button;
+};
+
 struct TitleFadingInfo
 {
   int fade_mode;
@@ -2807,6 +2818,7 @@ struct MenuInfo
   int music[NUM_SPECIAL_GFX_ARGS];
 
   struct MenuMainInfo main;
+  struct MenuSetupInfo setup;
 };
 
 struct DoorInfo
index fc7602749d33b7d3091c04e18d8c6f03ae1f7cf5..9e55d79699d2eabd1731d00378d6e3b6496098ff 100644 (file)
@@ -8330,13 +8330,13 @@ static void getScreenMenuButtonPos(int *x, int *y, int gadget_id)
       break;
 
     case SCREEN_CTRL_ID_PREV_PLAYER:
-      *x = mSX + TILEX * 10;
-      *y = mSY + TILEY * MENU_SCREEN_START_YPOS;
+      *x = mSX + GDI_ACTIVE_POS(menu.setup.button.prev_player.x);
+      *y = mSY + GDI_ACTIVE_POS(menu.setup.button.prev_player.y);
       break;
 
     case SCREEN_CTRL_ID_NEXT_PLAYER:
-      *x = mSX + TILEX * 12;
-      *y = mSY + TILEY * MENU_SCREEN_START_YPOS;
+      *x = mSX + GDI_ACTIVE_POS(menu.setup.button.next_player.x);
+      *y = mSY + GDI_ACTIVE_POS(menu.setup.button.next_player.y);
       break;
 
     case SCREEN_CTRL_ID_INSERT_SOLUTION: