-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"
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++)
{
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()
return TRUE;
}
- if (!Request("This level is read only ! "
- "Save into personal level set ?", REQ_ASK))
+ if (!Request("This level is read only! "
+ "Save into personal level set?", REQ_ASK))
return FALSE;
// "cd" to personal level set dir (for writing copy the first time)
}
else if (IS_CUSTOM_ELEMENT(element_old) && !IS_CUSTOM_ELEMENT(element_new))
{
- Request("Please choose custom element !", REQ_CONFIRM);
+ Request("Please choose custom element!", REQ_CONFIRM);
return FALSE;
}
else if (IS_GROUP_ELEMENT(element_old) && !IS_GROUP_ELEMENT(element_new))
{
- Request("Please choose group element !", REQ_CONFIRM);
+ Request("Please choose group element!", REQ_CONFIRM);
return FALSE;
}
if (level.use_custom_template)
{
- if (Request("Copy and modify level template ?", REQ_ASK))
+ if (Request("Copy and modify level template?", REQ_ASK))
{
level.use_custom_template = FALSE;
ModifyGadget(level_editor_gadget[GADGET_ID_CUSTOM_USE_TEMPLATE],
SetMainBackgroundImage(IMG_UNDEFINED);
ClearField();
- UnmapLevelEditorWindowGadgets();
+ UnmapLevelEditorFieldGadgets();
UnmapLevelEditorToolboxCustomGadgets();
AdjustDrawingAreaGadgets();
{
stick_element_properties_window = FALSE;
- UnmapLevelEditorWindowGadgets();
+ UnmapLevelEditorFieldGadgets();
SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
ClearField();
CopyElementPropertiesToEditor(properties_element);
- UnmapLevelEditorWindowGadgets();
+ UnmapLevelEditorFieldGadgets();
UnmapLevelEditorToolboxDrawingGadgets();
UnmapLevelEditorToolboxCustomGadgets();
static int DrawLevelText(int sx, int sy, char letter, int mode)
{
static short delete_buffer[MAX_LEV_FIELDX];
- static int start_sx, start_sy;
+ static int start_sx;
+#if 0
+ static int start_sy;
+#endif
static int last_sx, last_sy;
static boolean typing = FALSE;
int letter_element = EL_CHAR_ASCII0 + letter;
DrawLevelText(0, 0, 0, TEXT_END);
typing = TRUE;
- start_sx = last_sx = sx;
- start_sy = last_sy = sy;
+ start_sx = sx;
+#if 0
+ start_sy = sy;
+#endif
+ last_sx = sx;
+ last_sy = sy;
DrawLevelText(sx, sy, 0, TEXT_SETCURSOR);
break;
if ((level_changed && pressed) || (!level_changed && released))
return;
- if (level_changed && !Request("Level has changed ! Discard changes ?",
+ if (level_changed && !Request("Level has changed! Discard changes?",
REQ_ASK))
{
if (gadget_id == counterbutton_info[counter_id].gadget_id_text)
CopyPlayfield(Feld, level.field);
if (new_template ||
- Request("Save this template and kill the old ?", REQ_ASK))
+ Request("Save this template and kill the old?", REQ_ASK))
SaveLevelTemplate();
if (new_template)
- Request("Template saved !", REQ_CONFIRM);
+ Request("Template saved!", REQ_CONFIRM);
/* restore original "level.field" (needed to track playfield changes) */
CopyPlayfield(FieldBackup, level.field);
if (level.use_custom_template && !fileExists(template_filename))
{
- Request("No level template found !", REQ_CONFIRM);
+ Request("No level template found!", REQ_CONFIRM);
level.use_custom_template = FALSE;
ModifyGadget(gi, GDI_CHECKED, FALSE, GDI_END);
case GADGET_ID_UNDO:
if (undo_buffer_steps == 0)
{
- Request("Undo buffer empty !", REQ_CONFIRM);
+ Request("Undo buffer empty!", REQ_CONFIRM);
break;
}
new_level = !fileExists(level_filename);
if (new_level ||
- Request("Save this level and kill the old ?", REQ_ASK))
+ Request("Save this level and kill the old?", REQ_ASK))
{
if (leveldir_former->readonly)
ModifyLevelInfoForSavingIntoPersonalLevelSet(leveldir_former->name);
if (leveldir_former->readonly)
sprintf(level_saved_msg,
- "Level saved as level %d into personal level set !",
+ "Level saved as level %d into personal level set!",
level_nr);
else
- strcpy(level_saved_msg, "Level saved !");
+ strcpy(level_saved_msg, "Level saved!");
Request(level_saved_msg, REQ_CONFIRM);
}
{
if (!ask_if_level_has_changed ||
!LevelChanged() ||
- Request("Level has changed ! Exit without saving ?",
+ Request("Level has changed! Exit without saving?",
REQ_ASK | REQ_STAY_OPEN))
{
CloseDoor(DOOR_CLOSE_1);