X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=15b71a097c8939bdb531036b6b9c7ccf04fd780f;hb=19d38b8a650bd10ffbbaed031f5b3819dbcd32ce;hp=c6d6ecfafcb71294662debda1c97e38e1f4e953c;hpb=439b24a7e57f7af4081ef917fabe6b3cb78d902d;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index c6d6ecfa..15b71a09 100644 --- a/src/editor.c +++ b/src/editor.c @@ -2587,12 +2587,13 @@ static struct -1, -1, /* these values are not constant, but can change at runtime */ ED_SCROLL2_VERTICAL_XSIZE, ED_SCROLL2_VERTICAL_YSIZE, -1, -1, /* these values are not constant, but can change at runtime */ + -1, -1, /* these values are not constant, but can change at runtime */ #else DX + ED_SCROLL2_VERTICAL_XPOS, DY + ED_SCROLL2_VERTICAL_YPOS, ED_SCROLL2_VERTICAL_XSIZE, ED_SCROLL2_VERTICAL_YSIZE, DX, DY, -#endif DXSIZE, DYSIZE, +#endif GD_TYPE_SCROLLBAR_VERTICAL, GADGET_ID_SCROLL_LIST_VERTICAL, "scroll element list vertically" @@ -6052,6 +6053,8 @@ static void CreateScrollbarGadgets() DY + ED_SCROLL2_VERTICAL_YPOS; scrollbar_info[ED_SCROLLBAR_ID_LIST_VERTICAL].wheel_x = DX; scrollbar_info[ED_SCROLLBAR_ID_LIST_VERTICAL].wheel_y = DY; + scrollbar_info[ED_SCROLLBAR_ID_LIST_VERTICAL].wheel_width = DXSIZE; + scrollbar_info[ED_SCROLLBAR_ID_LIST_VERTICAL].wheel_height = DYSIZE; for (i = 0; i < ED_NUM_SCROLLBARS; i++) { @@ -6652,13 +6655,20 @@ static void UnmapDrawingArea(int id) UnmapGadget(level_editor_gadget[drawingarea_info[id].gadget_id]); } -static void UnmapLevelEditorWindowGadgets() +static void UnmapLevelEditorFieldGadgets() { int i; +#if 1 + for (i = 0; i < NUM_EDITOR_GADGETS; i++) + if (IN_GFX_FIELD_FULL(level_editor_gadget[i]->x, + level_editor_gadget[i]->y)) + UnmapGadget(level_editor_gadget[i]); +#else for (i = 0; i < NUM_EDITOR_GADGETS; i++) if (level_editor_gadget[i]->x < SX + SXSIZE) UnmapGadget(level_editor_gadget[i]); +#endif } void UnmapLevelEditorGadgets() @@ -7752,7 +7762,7 @@ static void DrawDrawingWindow() SetMainBackgroundImage(IMG_UNDEFINED); ClearField(); - UnmapLevelEditorWindowGadgets(); + UnmapLevelEditorFieldGadgets(); UnmapLevelEditorToolboxCustomGadgets(); AdjustDrawingAreaGadgets(); @@ -7923,7 +7933,7 @@ static void DrawLevelInfoWindow() { stick_element_properties_window = FALSE; - UnmapLevelEditorWindowGadgets(); + UnmapLevelEditorFieldGadgets(); SetMainBackgroundImage(IMG_BACKGROUND_EDITOR); ClearField(); @@ -8889,7 +8899,7 @@ static void DrawPropertiesWindow() CopyElementPropertiesToEditor(properties_element); - UnmapLevelEditorWindowGadgets(); + UnmapLevelEditorFieldGadgets(); UnmapLevelEditorToolboxDrawingGadgets(); UnmapLevelEditorToolboxCustomGadgets();