From: Holger Schemel Date: Mon, 25 Jan 1999 03:31:13 +0000 (+0100) Subject: rnd-19990125-2 X-Git-Tag: 1.3.0^2~15 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=bdfe5693df0e5a9318bb7b0c8599426f2a47c127;p=rocksndiamonds.git rnd-19990125-2 --- diff --git a/src/editor.c b/src/editor.c index f8542695..2812b01e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4143,8 +4143,23 @@ static void HandleControlButtons(struct GadgetInfo *gi) break; default: + if (id >= GADGET_ID_ELEMENTLIST_FIRST && + id <= GADGET_ID_ELEMENTLIST_LAST) + { + int element_position = id - GADGET_ID_ELEMENTLIST_FIRST; + int new_element = editor_element[element_position + element_shift]; + + PickDrawingElement(button, new_element); + + if (!HAS_CONTENT(properties_element)) + { + properties_element = new_element; + if (edit_mode == ED_MODE_PROPERTIES) + DrawPropertiesWindow(); + } + } #ifdef DEBUG - if (gi->event.type == GD_EVENT_PRESSED) + else if (gi->event.type == GD_EVENT_PRESSED) printf("default: HandleControlButtons: GD_EVENT_PRESSED\n"); else if (gi->event.type == GD_EVENT_RELEASED) printf("default: HandleControlButtons: GD_EVENT_RELEASED\n");