2006-10-17
* added additional configuration directives for info screen draw offset:
menu.draw_{x,y}offset.INFO[{ELEMENTS,MUSIC,CREDITS,PROGRAM,LEVELSET}]
+ * added additional configuration directives for preview info text
+ * limited mouse wheel sensitive screen area to scrollable screen area
2006-10-16
* added highlighted menu text entries to menu navigation when selected
{ "main.text.first_level.y", "98" },
{ "main.text.last_level.x", "488" },
{ "main.text.last_level.y", "112" },
- { "main.text.levelset_info.x", "-1" },
- { "main.text.levelset_info.y", "-1" },
- { "main.text.level_info.x", "-1" },
- { "main.text.level_info.y", "-1" },
+ { "main.text.level_info_1.x", "272" },
+ { "main.text.level_info_1.y", "352" },
+ { "main.text.level_info_2.x", "272" },
+ { "main.text.level_info_2.y", "523" },
{ "main.input.name.x", "-1" },
{ "main.input.name.y", "-1" },
-#define COMPILE_DATE_STRING "[2006-10-17 20:23]"
+#define COMPILE_DATE_STRING "[2006-10-18 01:10]"
ED_SCROLLBAR_XPOS, ED_SCROLLBAR_YPOS,
SX + ED_SCROLL_HORIZONTAL_XPOS, SY + ED_SCROLL_HORIZONTAL_YPOS,
ED_SCROLL_HORIZONTAL_XSIZE, ED_SCROLL_HORIZONTAL_YSIZE,
+#if 1
+ SX, SY,
+ SXSIZE, SYSIZE,
+#else
0, 0,
SX + SXSIZE + SX, WIN_YSIZE,
+#endif
GD_TYPE_SCROLLBAR_HORIZONTAL,
GADGET_ID_SCROLL_HORIZONTAL,
"scroll level editing area horizontally"
ED_SCROLLBAR_XPOS, ED_SCROLLBAR_YPOS,
SX + ED_SCROLL_VERTICAL_XPOS, SY + ED_SCROLL_VERTICAL_YPOS,
ED_SCROLL_VERTICAL_XSIZE, ED_SCROLL_VERTICAL_YSIZE,
+#if 1
+ SX, SY,
+ SXSIZE, SYSIZE,
+#else
0, 0,
SX + SXSIZE + SX, WIN_YSIZE,
+#endif
GD_TYPE_SCROLLBAR_VERTICAL,
GADGET_ID_SCROLL_VERTICAL,
"scroll level editing area vertically"
ED_SCROLLBAR2_XPOS, ED_SCROLLBAR2_YPOS,
DX + ED_SCROLL2_VERTICAL_XPOS, DY + ED_SCROLL2_VERTICAL_YPOS,
ED_SCROLL2_VERTICAL_XSIZE, ED_SCROLL2_VERTICAL_YSIZE,
+#if 1
+ DX, DY,
+ DXSIZE, DYSIZE,
+#else
SX + SXSIZE + SX, 0,
WIN_XSIZE - (SX + SXSIZE + SX), WIN_YSIZE,
+#endif
GD_TYPE_SCROLLBAR_VERTICAL,
GADGET_ID_SCROLL_LIST_VERTICAL,
"scroll element list vertically"
{ "main.text.first_level.y", &menu.main.text.first_level.y },
{ "main.text.last_level.x", &menu.main.text.last_level.x },
{ "main.text.last_level.y", &menu.main.text.last_level.y },
- { "main.text.levelset_info.x",&menu.main.text.levelset_info.x },
- { "main.text.levelset_info.y",&menu.main.text.levelset_info.y },
- { "main.text.level_info.x", &menu.main.text.level_info.x },
- { "main.text.level_info.y", &menu.main.text.level_info.y },
+ { "main.text.level_info_1.x", &menu.main.text.level_info_1.x },
+ { "main.text.level_info_1.y", &menu.main.text.level_info_1.y },
+ { "main.text.level_info_2.x", &menu.main.text.level_info_2.x },
+ { "main.text.level_info_2.y", &menu.main.text.level_info_2.y },
{ "main.input.name.x", &menu.main.input.name.x },
{ "main.input.name.y", &menu.main.input.name.y },
struct Rect current_level;
struct Rect first_level;
struct Rect last_level;
- struct Rect levelset_info;
- struct Rect level_info;
+ struct Rect level_info_1;
+ struct Rect level_info_2;
};
struct MenuMainInputInfo
{
MAIN_CONTROL_LEVELSET_INFO,
NULL, -1,
- &menu.main.text.levelset_info, NULL, -1,
+ &menu.main.text.level_info_1, NULL, -1,
NULL, NULL, -1,
},
{
MAIN_CONTROL_LEVEL_INFO,
NULL, -1,
- &menu.main.text.level_info, NULL, -1,
+ &menu.main.text.level_info_2, NULL, -1,
NULL, NULL, -1,
},
GDI_SCROLLBAR_ITEMS_MAX, items_max,
GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
GDI_SCROLLBAR_ITEM_POSITION, item_position,
+#if 1
+ GDI_WHEEL_AREA_X, SX,
+ GDI_WHEEL_AREA_Y, SY,
+ GDI_WHEEL_AREA_WIDTH, SXSIZE,
+ GDI_WHEEL_AREA_HEIGHT, SYSIZE,
+#else
GDI_WHEEL_AREA_X, 0,
GDI_WHEEL_AREA_Y, 0,
GDI_WHEEL_AREA_WIDTH, WIN_XSIZE,
GDI_WHEEL_AREA_HEIGHT, WIN_YSIZE,
+#endif
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_DESIGN_UNPRESSED, gd_bitmap_unpressed, gd_x1, gd_y1,
GDI_DESIGN_PRESSED, gd_bitmap_pressed, gd_x2, gd_y2,
if (strlen(label_text) > 0)
{
+#if 1
+ int text_width = getTextWidth(label_text, font_nr);
+ int lxpos = SX + menu.main.text.level_info_2.x - text_width / 2;
+ int lypos = SY + menu.main.text.level_info_2.y;
+#else
int lxpos = SX + (SXSIZE - getTextWidth(label_text, font_nr)) / 2;
int lypos = MICROLABEL2_YPOS;
+#endif
DrawText(lxpos, lypos, label_text, font_nr);
}
if (strlen(label_text) > 0)
{
+#if 1
+ int text_width = getTextWidth(label_text, font_nr);
+ int lxpos = SX + menu.main.text.level_info_2.x - text_width / 2;
+ int lypos = SY + menu.main.text.level_info_2.y;
+#else
int lxpos = SX + (SXSIZE - getTextWidth(label_text, font_nr)) / 2;
int lypos = MICROLABEL2_YPOS;
+#endif
DrawText(lxpos, lypos, label_text, font_nr);
}
char label_text[MAX_OUTPUT_LINESIZE + 1];
int font_nr = FONT_TEXT_1;
int max_len_label_text = SXSIZE / getFontWidth(font_nr);
+ int text_width;
int lxpos, lypos;
strncpy(label_text, leveldir_current->name, max_len_label_text);
label_text[max_len_label_text] = '\0';
+#if 1
+ text_width = getTextWidth(label_text, font_nr);
+ lxpos = SX + menu.main.text.level_info_1.x - text_width / 2;
+ lypos = SY + menu.main.text.level_info_1.y;
+#else
lxpos = SX + (SXSIZE - getTextWidth(label_text, font_nr)) / 2;
lypos = SY + MICROLABEL1_YPOS;
+#endif
DrawText(lxpos, lypos, label_text, font_nr);
}