rnd-20140212-1-src
[rocksndiamonds.git] / src / editor.c
index 005a1a2ac5d9be237d106de2f0eb08b360294871..d939c15437b1fee82f806c0b48ad7a945640d61d 100644 (file)
@@ -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++)
   {
@@ -6733,8 +6736,8 @@ static boolean PrepareSavingIntoPersonalLevelSet()
     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)
@@ -7012,13 +7015,13 @@ static boolean CopyCustomElement(int element_old, int element_new,
   }
   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;
   }
@@ -7243,7 +7246,7 @@ static void CopyCustomElementPropertiesToGame(int element)
 
   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],
@@ -10878,7 +10881,7 @@ static void HandleCounterButtons(struct GadgetInfo *gi)
     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)
@@ -11051,11 +11054,11 @@ static void HandleTextbuttonGadgets(struct GadgetInfo *gi)
     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);
@@ -11171,7 +11174,7 @@ static void HandleCheckbuttons(struct GadgetInfo *gi)
 
     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);
@@ -11404,7 +11407,7 @@ static void HandleControlButtons(struct GadgetInfo *gi)
     case GADGET_ID_UNDO:
       if (undo_buffer_steps == 0)
       {
-       Request("Undo buffer empty !", REQ_CONFIRM);
+       Request("Undo buffer empty!", REQ_CONFIRM);
        break;
       }
 
@@ -11478,7 +11481,7 @@ static void HandleControlButtons(struct GadgetInfo *gi)
       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);
@@ -11494,10 +11497,10 @@ static void HandleControlButtons(struct GadgetInfo *gi)
 
          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);
        }
@@ -12003,7 +12006,7 @@ void RequestExitLevelEditor(boolean ask_if_level_has_changed,
 {
   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);