From: Holger Schemel Date: Tue, 17 Oct 2006 23:11:02 +0000 (+0200) Subject: rnd-20061018-1-src X-Git-Tag: 3.2.3^2~29 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d6d1c9d93fa318a7e49304f008dd6a965a5dc48c;p=rocksndiamonds.git rnd-20061018-1-src * added additional configuration directives for preview info text * limited mouse wheel sensitive screen area to scrollable screen area --- diff --git a/ChangeLog b/ChangeLog index 2708c47b..9b9c4949 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 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 diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 019af377..c05b068b 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -4628,10 +4628,10 @@ struct ConfigInfo image_config[] = { "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" }, diff --git a/src/conftime.h b/src/conftime.h index 6d93226e..5cd11bed 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-10-17 20:23]" +#define COMPILE_DATE_STRING "[2006-10-18 01:10]" diff --git a/src/editor.c b/src/editor.c index e9168f56..4218efbb 100644 --- a/src/editor.c +++ b/src/editor.c @@ -2413,8 +2413,13 @@ static struct 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" @@ -2423,8 +2428,13 @@ static struct 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" @@ -2433,8 +2443,13 @@ static struct 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" diff --git a/src/main.c b/src/main.c index f7925c45..747debeb 100644 --- a/src/main.c +++ b/src/main.c @@ -4754,10 +4754,10 @@ struct TokenIntPtrInfo image_config_vars[] = { "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 }, diff --git a/src/main.h b/src/main.h index 36fb3b16..3dee9b39 100644 --- a/src/main.h +++ b/src/main.h @@ -1875,8 +1875,8 @@ struct MenuMainTextInfo 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 diff --git a/src/screens.c b/src/screens.c index cae3c5f2..eb785c54 100644 --- a/src/screens.c +++ b/src/screens.c @@ -322,13 +322,13 @@ main_controls[] = { 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, }, @@ -4621,10 +4621,17 @@ static void CreateScreenScrollbars() 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, diff --git a/src/tools.c b/src/tools.c index 17864c32..85cee1dd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1732,8 +1732,14 @@ static void DrawPreviewLevelLabelExt(int mode) 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); } @@ -1751,8 +1757,14 @@ static void DrawPreviewLevelLabelExt(int mode) 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); } @@ -1795,13 +1807,20 @@ void DrawPreviewLevel(boolean restart) 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); }