projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7bb50d
)
rnd-19990125-2
author
Holger Schemel
<info@artsoft.org>
Mon, 25 Jan 1999 03:31:13 +0000
(
04:31
+0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Aug 2014 08:33:14 +0000
(10:33 +0200)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index f8542695ec65b0fb4b3c1f83f93b128c7b91c319..2812b01e9025311bb389fa9519b7c36a4fd68855 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-4143,8
+4143,23
@@
static void HandleControlButtons(struct GadgetInfo *gi)
break;
default:
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
#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");
printf("default: HandleControlButtons: GD_EVENT_PRESSED\n");
else if (gi->event.type == GD_EVENT_RELEASED)
printf("default: HandleControlButtons: GD_EVENT_RELEASED\n");