{ "titlemessage_5.post_delay", ARG_DEFAULT },
{ "titlemessage_5.auto_delay", ARG_DEFAULT },
- { "readme.x", "272" },
- { "readme.y", "150" },
- { "readme.width", "480" },
- { "readme.height", "364" },
+ { "readme.x", "-1" },
+ { "readme.y", "-1" },
+ { "readme.width", "-1" },
+ { "readme.height", "-1" },
{ "readme.chars", "-1" },
{ "readme.lines", "-1" },
{ "readme.align", "center" },
int ystart2 = mSY - SY + 150;
int ybottom = mSY - SY + SYSIZE - 20;
- SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
+ SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO);
FadeOut(REDRAW_FIELD);
{
struct TitleMessageInfo *tmi = &readme;
char *filename = getLevelSetInfoFilename();
+ char *title = "Level Set Information:";
+ int ystart1 = mSY - SY + 100;
+ int ystart2 = mSY - SY + 150;
+ int ybottom = mSY - SY + SYSIZE - 20;
+
+ if (filename == NULL)
+ {
+ DrawInfoScreen_NotAvailable(title, "No information for this level set.");
+
+ return;
+ }
+
+ SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
+
+ FadeOut(REDRAW_FIELD);
+
+ ClearField();
+ DrawHeadline();
+
+ DrawTextSCentered(ystart1, FONT_TEXT_1, title);
+
+ /* if x position set to "-1", automatically determine by playfield width */
+ if (tmi->x == -1)
+ tmi->x = SXSIZE / 2;
+
+ /* if y position set to "-1", use static default value */
+ if (tmi->y == -1)
+ tmi->y = 150;
+
+ /* if width set to "-1", automatically determine by playfield width */
+ if (tmi->width == -1)
+ tmi->width = SXSIZE - 2 * TILEX;
+
+ /* if height set to "-1", automatically determine by playfield height */
+ if (tmi->height == -1)
+ tmi->height = SYSIZE - 20 - tmi->y - 10;
/* if chars set to "-1", automatically determine by text and font width */
if (tmi->chars == -1)
else
tmi->height = tmi->lines * getFontHeight(tmi->font);
- SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
-
- FadeOut(REDRAW_FIELD);
-
- ClearField();
- DrawHeadline();
-
- DrawTextCentered(mSY + 100, FONT_TEXT_1, "Level Set Information:");
-
- if (filename != NULL)
- DrawTextFile(mSX + ALIGNED_TEXT_XPOS(tmi), mSY + ALIGNED_TEXT_YPOS(tmi),
- filename, tmi->font, tmi->chars, -1, tmi->lines, 0, -1,
- tmi->autowrap, tmi->centered, tmi->parse_comments);
- else
- DrawTextCentered(mSY + ALIGNED_TEXT_YPOS(tmi), FONT_TEXT_2,
- "No information for this level set.");
+ DrawTextFile(mSX + ALIGNED_TEXT_XPOS(tmi), mSY + ALIGNED_TEXT_YPOS(tmi),
+ filename, tmi->font, tmi->chars, -1, tmi->lines, 0, -1,
+ tmi->autowrap, tmi->centered, tmi->parse_comments);
- DrawTextCentered(mSY + SYSIZE - 20, FONT_TEXT_4,
- "Press any key or button for info menu");
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
+ "Press any key or button for info menu");
FadeIn(REDRAW_FIELD);
}