X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=69c63d208d74d0668fde7a200d8e3e86c6557b4a;hb=07ebce49a5cbbaa7728e84e118961f750abe377a;hp=2a7a8e4e19e7662046cb069eedf580093b3a8d4e;hpb=7758484aa10294db3689a7eacc9c4b64132d5d6e;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 2a7a8e4e..69c63d20 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" @@ -6761,7 +6776,11 @@ void DrawLevelEd() ReinitializeElementList(); /* update dynamic level element list */ ReinitializeElementListButtons(); /* custom element may look different */ +#if 1 + UnmapAllGadgets(); +#else UnmapTapeButtons(); +#endif MapControlButtons(); DrawEditModeWindow(); @@ -9062,7 +9081,14 @@ static void HandleTextAreaGadgets(struct GadgetInfo *gi) { int type_id = gi->custom_type_id; +#if 1 + strncpy(textarea_info[type_id].value, gi->textarea.value, + MAX_ENVELOPE_TEXT_LEN); + textarea_info[type_id].value[MAX_ENVELOPE_TEXT_LEN] = '\0'; +#else + /* !!! BUGGY !!! MAX_ENVELOPE_TEXT_LEN != MAX_GADGET_TEXTSIZE !!! */ strcpy(textarea_info[type_id].value, gi->textarea.value); +#endif level.changed = TRUE; }