added separate title font for showing story before starting the game
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 9 Nov 2024 15:24:28 +0000 (16:24 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 9 Nov 2024 15:24:30 +0000 (16:24 +0100)
src/conf_gfx.c
src/main.c
src/main.h
src/screens.c

index da47a80d3e5310f52265919ddc13c77e631097c1..a580c3cbef17ba39622bbd45ae4ba9b55369b648 100644 (file)
@@ -7776,7 +7776,8 @@ struct ConfigInfo image_config[] =
   { "font.title_2.height",                             "14"                            },
   { "font.title_2.SETUP",                              UNDEFINED_FILENAME              },
   { "font.title_2.SETUP.clone_from",                   "font.text_2"                   },
-
+  { "font.title_story",                                        UNDEFINED_FILENAME              },
+  { "font.title_story.clone_from",                     "font.text_1.LEVELS"            },
   { "font.footer",                                     UNDEFINED_FILENAME              },
   { "font.footer.clone_from",                          "font.text_4"                   },
   { "font.footer.INFO",                                        UNDEFINED_FILENAME              },
@@ -9432,6 +9433,11 @@ struct ConfigInfo image_config[] =
   { "menu.text.title_2.align",                         "center"                        },
   { "menu.text.title_2.valign",                                "top"                           },
   { "menu.text.title_2.font",                          "font.title_2"                  },
+  { "menu.text.title_story.x",                         "-1"                            },
+  { "menu.text.title_story.y",                         "32"                            },
+  { "menu.text.title_story.align",                     "center"                        },
+  { "menu.text.title_story.valign",                    "top"                           },
+  { "menu.text.title_story.font",                      "font.title_story"              },
   { "menu.text.footer.x",                              "-1"                            },
   { "menu.text.footer.y",                              "-8"                            },
   { "menu.text.footer.align",                          "center"                        },
index 725a98d4b252ea724e1a2a79ee8552e5888c0972..4c7e2e4bc70d027f909d901dfc28aad0f97d029e 100644 (file)
@@ -9341,6 +9341,7 @@ struct FontInfo font_info[NUM_FONTS + 1] =
   { "font.initial_4"           },
   { "font.title_1"             },
   { "font.title_2"             },
+  { "font.title_story"         },
   { "font.footer"              },
   { "font.menu_1.active"       },
   { "font.menu_2.active"       },
index 82d91550dce439f5892dd78bc6115621805442b2..3b22f2556ce50e18cba93fef1deefceffa8b7880 100644 (file)
@@ -2996,6 +2996,7 @@ enum
   FONT_INITIAL_4 = MAIN_FONT_INITIAL_4,
   FONT_TITLE_1,
   FONT_TITLE_2,
+  FONT_TITLE_STORY,
   FONT_FOOTER,
   FONT_MENU_1_ACTIVE,
   FONT_MENU_2_ACTIVE,
@@ -3249,6 +3250,7 @@ struct MenuTextInfo
   struct TextPosInfo title;
   struct TextPosInfo title_1;
   struct TextPosInfo title_2;
+  struct TextPosInfo title_story;
   struct TextPosInfo footer;
 };
 
index 3f55035d3eb091ce878a9d8fadf4306ae03bcf35..779e7b31f8efa8ae1b0d1f9b49f6e7bb741c4704 100644 (file)
 #define MENU_TITLE_YPOS                                MENU_TEXT_ALIGNED_YPOS(menu.text.title)
 #define MENU_TITLE1_YPOS                       MENU_TEXT_ALIGNED_YPOS(menu.text.title_1)
 #define MENU_TITLE2_YPOS                       MENU_TEXT_ALIGNED_YPOS(menu.text.title_2)
+#define MENU_TITLE_STORY_YPOS                  MENU_TEXT_ALIGNED_YPOS(menu.text.title_story)
 #define MENU_FOOTER_YPOS                       MENU_TEXT_ALIGNED_YPOS(menu.text.footer)
 #define MENU_INFO_FONT_TITLE                   FONT_TEXT_1
 #define MENU_INFO_FONT_HEAD                    FONT_TEXT_2
@@ -1772,8 +1773,15 @@ static void DrawInfoScreen_Headline(int screen_nr, int num_screens,
     snprintf(info_text_title_2, max_text_len, text_format, name_cut);
   }
 
-  DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, info_text_title_1);
-  DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, info_text_title_2);
+  if (info_mode == INFO_MODE_STORY)
+  {
+    DrawTextSCentered(MENU_TITLE_STORY_YPOS, FONT_TITLE_STORY, info_text_title_2);
+  }
+  else
+  {
+    DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, info_text_title_1);
+    DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, info_text_title_2);
+  }
 }
 
 static void DrawTitleScreenImage(int nr, boolean initial)