rnd-20030704-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 4 Jul 2003 08:50:56 +0000 (10:50 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:42:35 +0000 (10:42 +0200)
src/conftime.h
src/editor.c
src/files.c

index ec4b799c1e6143eb10474021ab47c671f3a6d9e7..9eaef5e63de384021e61ddcb30e6e32fcb3afe42 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-07-03 21:19]"
+#define COMPILE_DATE_STRING "[2003-07-04 09:17]"
index 4696db8b4d878a4ff764de6f5a4753f3d3951dc9..969aad79e6f72a4688bcdea75d87b3e7bc96a212 100644 (file)
@@ -2384,10 +2384,10 @@ static char *getElementInfoText(int element)
 
   if (element < NUM_FILE_ELEMENTS)
   {
-    if (element_info[element].custom_description != NULL)
-      info_text = element_info[element].custom_description;
-    else if (strlen(element_info[element].description) > 0)
+    if (strlen(element_info[element].description) > 0)
       info_text = element_info[element].description;
+    else if (element_info[element].custom_description != NULL)
+      info_text = element_info[element].custom_description;
     else if (element_info[element].editor_description != NULL)
       info_text = element_info[element].editor_description;
   }
@@ -5926,7 +5926,11 @@ static void HandleTextInputGadgets(struct GadgetInfo *gi)
   strcpy(textinput_info[type_id].value, gi->text.value);
 
   if (type_id == ED_TEXTINPUT_ID_ELEMENT_NAME)
+  {
     CopyCustomElementPropertiesToGame(properties_element);
+
+    ModifyEditorElementList(); /* update changed button info text */
+  }
 }
 
 static void HandleSelectboxGadgets(struct GadgetInfo *gi)
index 787013ba2e1e17ebc8daa5cffbfd04623ebcf7e1..1396b60e47c1db782ea4551a0106e66572e0efa8 100644 (file)
@@ -105,10 +105,14 @@ static void setLevelInfoToDefaults()
   {
     int element = EL_CUSTOM_START + i;
 
-    for(j=0; j<MAX_ELEMENT_NAME_LEN; j++)
+    for(j=0; j<MAX_ELEMENT_NAME_LEN + 1; j++)
       element_info[element].description[j] = '\0';
-    strcpy(element_info[element].description,
-          element_info[element].editor_description);
+    if (element_info[element].custom_description != NULL)
+      strncpy(element_info[element].description,
+             element_info[element].custom_description, MAX_ELEMENT_NAME_LEN);
+    else
+      strcpy(element_info[element].description,
+            element_info[element].editor_description);
 
     element_info[element].use_gfx_element = FALSE;
     element_info[element].gfx_element = EL_EMPTY_SPACE;