From: Holger Schemel Date: Fri, 11 Mar 2022 12:46:51 +0000 (+0100) Subject: added score selection buttons for score info page (not used yet) X-Git-Tag: 4.3.2.0~85 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=86d415d483595dc87c7b78991554744c680af740;p=rocksndiamonds.git added score selection buttons for score info page (not used yet) --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index a84abc70..9d5db3f1 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -6146,6 +6146,15 @@ struct ConfigInfo image_config[] = { "menu.button_prev_level2.active", UNDEFINED_FILENAME }, { "menu.button_prev_level2.active.clone_from", "menu.button_left.active" }, + { "menu.button_next_score", UNDEFINED_FILENAME }, + { "menu.button_next_score.clone_from", "menu.button_down" }, + { "menu.button_next_score.active", UNDEFINED_FILENAME }, + { "menu.button_next_score.active.clone_from", "menu.button_down.active" }, + { "menu.button_prev_score", UNDEFINED_FILENAME }, + { "menu.button_prev_score.clone_from", "menu.button_up" }, + { "menu.button_prev_score.active", UNDEFINED_FILENAME }, + { "menu.button_prev_score.active.clone_from", "menu.button_up.active" }, + { "menu.button_name", UNDEFINED_FILENAME }, { "menu.button_name.clone_from", "menu.button" }, { "menu.button_name.active", UNDEFINED_FILENAME }, @@ -8338,6 +8347,11 @@ struct ConfigInfo image_config[] = { "scores.button.next_level.x", "-1" }, { "scores.button.next_level.y", "-1" }, + { "scores.button.prev_score.x", "-1" }, + { "scores.button.prev_score.y", "-1" }, + { "scores.button.next_score.x", "-1" }, + { "scores.button.next_score.y", "-1" }, + { "preview.x", "272" }, { "preview.y", "380" }, { "preview.align", "center" }, diff --git a/src/main.h b/src/main.h index e689b266..45ce857f 100644 --- a/src/main.h +++ b/src/main.h @@ -2810,6 +2810,8 @@ struct MenuScoresButtonInfo { struct MenuPosInfo prev_level; struct MenuPosInfo next_level; + struct MenuPosInfo prev_score; + struct MenuPosInfo next_score; }; struct MenuScoresInfo diff --git a/src/screens.c b/src/screens.c index eefb5df9..0d26b8e9 100644 --- a/src/screens.c +++ b/src/screens.c @@ -186,26 +186,30 @@ #define SCREEN_CTRL_ID_NEXT_LEVEL 1 #define SCREEN_CTRL_ID_PREV_LEVEL2 2 #define SCREEN_CTRL_ID_NEXT_LEVEL2 3 -#define SCREEN_CTRL_ID_FIRST_LEVEL 4 -#define SCREEN_CTRL_ID_LAST_LEVEL 5 -#define SCREEN_CTRL_ID_LEVEL_NUMBER 6 -#define SCREEN_CTRL_ID_PREV_PLAYER 7 -#define SCREEN_CTRL_ID_NEXT_PLAYER 8 -#define SCREEN_CTRL_ID_INSERT_SOLUTION 9 -#define SCREEN_CTRL_ID_PLAY_SOLUTION 10 -#define SCREEN_CTRL_ID_SWITCH_ECS_AGA 11 -#define SCREEN_CTRL_ID_TOUCH_PREV_PAGE 12 -#define SCREEN_CTRL_ID_TOUCH_NEXT_PAGE 13 -#define SCREEN_CTRL_ID_TOUCH_PREV_PAGE2 14 -#define SCREEN_CTRL_ID_TOUCH_NEXT_PAGE2 15 -#define SCREEN_CTRL_ID_SCROLL_UP 16 -#define SCREEN_CTRL_ID_SCROLL_DOWN 17 -#define SCREEN_CTRL_ID_SCROLL_VERTICAL 18 -#define SCREEN_CTRL_ID_NETWORK_SERVER 19 - -#define NUM_SCREEN_GADGETS 20 - -#define NUM_SCREEN_MENUBUTTONS 16 +#define SCREEN_CTRL_ID_PREV_SCORE 4 +#define SCREEN_CTRL_ID_NEXT_SCORE 5 +#define SCREEN_CTRL_ID_FIRST_LEVEL 6 +#define SCREEN_CTRL_ID_LAST_LEVEL 7 +#define SCREEN_CTRL_ID_LEVEL_NUMBER 8 +#define SCREEN_CTRL_ID_PREV_PLAYER 9 +#define SCREEN_CTRL_ID_NEXT_PLAYER 10 +#define SCREEN_CTRL_ID_INSERT_SOLUTION 11 +#define SCREEN_CTRL_ID_PLAY_SOLUTION 12 +#define SCREEN_CTRL_ID_SWITCH_ECS_AGA 13 +#define SCREEN_CTRL_ID_TOUCH_PREV_PAGE 14 +#define SCREEN_CTRL_ID_TOUCH_NEXT_PAGE 15 +#define SCREEN_CTRL_ID_TOUCH_PREV_PAGE2 16 +#define SCREEN_CTRL_ID_TOUCH_NEXT_PAGE2 17 + +#define NUM_SCREEN_MENUBUTTONS 18 + +#define SCREEN_CTRL_ID_SCROLL_UP 18 +#define SCREEN_CTRL_ID_SCROLL_DOWN 19 +#define SCREEN_CTRL_ID_SCROLL_VERTICAL 20 +#define SCREEN_CTRL_ID_NETWORK_SERVER 21 + +#define NUM_SCREEN_GADGETS 22 + #define NUM_SCREEN_SCROLLBUTTONS 2 #define NUM_SCREEN_SCROLLBARS 1 #define NUM_SCREEN_TEXTINPUT 1 @@ -216,6 +220,7 @@ #define SCREEN_MASK_TOUCH (1 << 3) #define SCREEN_MASK_TOUCH2 (1 << 4) #define SCREEN_MASK_SCORES (1 << 5) +#define SCREEN_MASK_SCORES_INFO (1 << 6) // graphic position and size values for buttons and scrollbars #define SC_MENUBUTTON_XSIZE TILEX @@ -9857,7 +9862,7 @@ static struct IMG_MENU_BUTTON_PREV_LEVEL2, IMG_MENU_BUTTON_PREV_LEVEL2_ACTIVE, &menu.scores.button.prev_level, NULL, SCREEN_CTRL_ID_PREV_LEVEL2, - SCREEN_MASK_SCORES, + SCREEN_MASK_SCORES | SCREEN_MASK_SCORES_INFO, GD_EVENT_PRESSED | GD_EVENT_REPEATED, FALSE, "previous level" }, @@ -9865,10 +9870,26 @@ static struct IMG_MENU_BUTTON_NEXT_LEVEL2, IMG_MENU_BUTTON_NEXT_LEVEL2_ACTIVE, &menu.scores.button.next_level, NULL, SCREEN_CTRL_ID_NEXT_LEVEL2, - SCREEN_MASK_SCORES, + SCREEN_MASK_SCORES | SCREEN_MASK_SCORES_INFO, GD_EVENT_PRESSED | GD_EVENT_REPEATED, FALSE, "next level" }, + { + IMG_MENU_BUTTON_PREV_SCORE, IMG_MENU_BUTTON_PREV_SCORE_ACTIVE, + &menu.scores.button.prev_score, NULL, + SCREEN_CTRL_ID_PREV_SCORE, + SCREEN_MASK_SCORES_INFO, + GD_EVENT_PRESSED | GD_EVENT_REPEATED, + FALSE, "previous score" + }, + { + IMG_MENU_BUTTON_NEXT_SCORE, IMG_MENU_BUTTON_NEXT_SCORE_ACTIVE, + &menu.scores.button.next_score, NULL, + SCREEN_CTRL_ID_NEXT_SCORE, + SCREEN_MASK_SCORES_INFO, + GD_EVENT_PRESSED | GD_EVENT_REPEATED, + FALSE, "next score" + }, { IMG_MENU_BUTTON_FIRST_LEVEL, IMG_MENU_BUTTON_FIRST_LEVEL_ACTIVE, &menu.main.button.first_level, NULL, @@ -10041,7 +10062,7 @@ static void CreateScreenMenubuttons(void) int screen_mask = menubutton_info[i].screen_mask; boolean is_touch_button = menubutton_info[i].is_touch_button; boolean is_check_button = menubutton_info[i].check_value != NULL; - boolean is_score_button = (screen_mask == SCREEN_MASK_SCORES); + boolean is_score_button = (screen_mask & SCREEN_MASK_SCORES_INFO); Bitmap *gd_bitmap_unpressed, *gd_bitmap_pressed; int gfx_unpressed, gfx_pressed; int x, y, width, height; @@ -10101,7 +10122,8 @@ static void CreateScreenMenubuttons(void) SX + (SXSIZE + title_width) / 2 + width / 2 : 0); if (pos->y == -1) - y = mSY + MENU_TITLE1_YPOS; + y = (id == SCREEN_CTRL_ID_PREV_LEVEL2 || + id == SCREEN_CTRL_ID_NEXT_LEVEL2 ? mSY + MENU_TITLE1_YPOS : 0); } gi = CreateGadget(GDI_CUSTOM_ID, id,