rnd-20061018-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 17 Oct 2006 23:11:02 +0000 (01:11 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:53:23 +0000 (10:53 +0200)
* added additional configuration directives for preview info text
* limited mouse wheel sensitive screen area to scrollable screen area

ChangeLog
src/conf_gfx.c
src/conftime.h
src/editor.c
src/main.c
src/main.h
src/screens.c
src/tools.c

index 2708c47b7c3b014285ec9167a1f020852849a282..9b9c49495a80594eacbc85b8363d0b7ea6fbfcdf 100644 (file)
--- 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
index 019af377ea7b22bbdd704f9b6cf95877f83395a0..c05b068bf910966b795708b7823d4fa335695eae 100644 (file)
@@ -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"                    },
index 6d93226e9ea0796a4381d1b8054f002b7d56555b..5cd11bed2e69d599c01d7f76c41c0ad44e606365 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2006-10-17 20:23]"
+#define COMPILE_DATE_STRING "[2006-10-18 01:10]"
index e9168f566086b132493234ae311442f30924b895..4218efbb530e4bf4e2b07229ebb4f93d1e29864a 100644 (file)
@@ -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"
index f7925c4574170a782f19dcc26a176a695de7610e..747debebe4986be2168ea117e9aa5f8382ab64e8 100644 (file)
@@ -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                       },
index 36fb3b16c6ae4e69cfe4f4d62a2b491b6ce45908..3dee9b39d6df2c0a2eb1ec315cafc076b433e17f 100644 (file)
@@ -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
index cae3c5f2d7258522e6378d8c82f30d201300818a..eb785c54eef1198420aae71f28788a07c417dddf 100644 (file)
@@ -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,
index 17864c32133cc217cc86a646953d138a04413b52..85cee1ddac6fc2a02421c485d1d982ffe87206de 100644 (file)
@@ -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);
     }