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 90749c4..10280fa 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 5075ee3..6c1a6ba 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 869e5ba..88577ac 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 fc76027..9e55d79 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: