X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=a1fa7ba138c0271344e878b16f3b193e01aaf04a;hb=c5ee7e4524f10322894b2547337e4c973a80a552;hp=60be1aaba58d9c370f8951f270ba5055b4f480b0;hpb=14089dac2cbe56e563863e1e5adb8847944fd262;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 60be1aab..a1fa7ba1 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1563,13 +1563,22 @@ static void ReinitializeElementListButtons() static char *getElementInfoText(int element) { - char *info_text = "unknown"; + char *info_text = NULL; + + if (element < NUM_FILE_ELEMENTS) + { + 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; + } + + if (info_text == NULL) + { + info_text = "unknown"; - if (element < NUM_FILE_ELEMENTS && - element_info[element].editor_description != NULL) - info_text = element_info[element].editor_description; - else Error(ERR_WARN, "no element description for element %d", element); + } return info_text; } @@ -1606,7 +1615,7 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) static void CreateControlButtons() { - Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap; + Bitmap *gd_bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap; struct GadgetInfo *gi; unsigned long event_mask; int i; @@ -1827,7 +1836,7 @@ static void CreateCounterButtons() for (j=0; j<2; j++) { - Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap; + Bitmap *gd_bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap; struct GadgetInfo *gi; int id = (j == 0 ? counterbutton_info[i].gadget_id_down : @@ -2049,7 +2058,7 @@ static void CreateTextInputGadgets() for (i=0; i