From: Holger Schemel Date: Tue, 17 Sep 2019 09:20:41 +0000 (+0200) Subject: added options for player selection button positions in setup menu X-Git-Tag: 4.1.4.0~21 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=914d869445048466ef00954109a15286938521c6;p=rocksndiamonds.git added options for player selection button positions in setup menu --- diff --git a/build-scripts/create_element_defs.pl b/build-scripts/create_element_defs.pl index 90749c42..10280faa 100755 --- a/build-scripts/create_element_defs.pl +++ b/build-scripts/create_element_defs.pl @@ -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/; diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 5075ee37..6c1a6ba2 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -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" }, diff --git a/src/main.h b/src/main.h index 869e5ba5..88577ac2 100644 --- a/src/main.h +++ b/src/main.h @@ -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 diff --git a/src/screens.c b/src/screens.c index fc760274..9e55d796 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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: