From: Holger Schemel Date: Wed, 27 Jan 1999 03:21:17 +0000 (+0100) Subject: rnd-19990127-2 X-Git-Tag: 1.3.0^2~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=27692dc5b9a97314671569bd81f07ece67515295;p=rocksndiamonds.git rnd-19990127-2 --- diff --git a/src/editor.c b/src/editor.c index 067759db..cd9436f1 100644 --- a/src/editor.c +++ b/src/editor.c @@ -421,7 +421,7 @@ static struct GADGET_ID_LEVEL_RANDOM_DOWN, GADGET_ID_LEVEL_RANDOM_UP, GADGET_ID_LEVEL_RANDOM_TEXT, &gadget_level_random_value, - "random elements", "in" + "random element placement", "in" } }; @@ -2937,6 +2937,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) boolean button_release_event; boolean inside_drawing_area = !gi->event.off_borders; boolean draw_level = (id == GADGET_ID_DRAWING_LEVEL); + int actual_drawing_function; int button = gi->event.button; int new_element = BUTTON_ELEMENT(button); int sx = gi->event.x, sy = gi->event.y; @@ -2995,11 +2996,16 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) button = 0; #endif - +#if 0 if (!draw_level && drawing_function != GADGET_ID_SINGLE_ITEMS) return; +#endif + + /* automatically switch to 'single item' drawing mode, if needed */ + actual_drawing_function = + (draw_level ? drawing_function : GADGET_ID_SINGLE_ITEMS); - switch (drawing_function) + switch (actual_drawing_function) { case GADGET_ID_SINGLE_ITEMS: if (draw_level)