diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-21 18:24:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-21 18:24:21 +0300 |
commit | 35b5ff92a5ab7d49bde2e572fc8d5de5367fb0db (patch) | |
tree | a01358d226390674fec1765a3feda99d08eca94f /src/ui/labelwidget.c | |
parent | ca17138cf54ee42792628269a77cc45a44b8e8dc (diff) |
Radio button widget flag
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 28f43173..f23091d8 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -51,7 +51,13 @@ static iBool checkModifiers_(int have, int req) { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | static void trigger_LabelWidget_(const iLabelWidget *d) { | 53 | static void trigger_LabelWidget_(const iLabelWidget *d) { |
54 | const iWidget *w = constAs_Widget(d); | ||
54 | postCommand_Widget(&d->widget, "%s", cstr_String(&d->command)); | 55 | postCommand_Widget(&d->widget, "%s", cstr_String(&d->command)); |
56 | if (flags_Widget(w) & radio_WidgetFlag) { | ||
57 | iForEach(ObjectList, i, children_Widget(w->parent)) { | ||
58 | setFlags_Widget(i.object, selected_WidgetFlag, d == i.object); | ||
59 | } | ||
60 | } | ||
55 | } | 61 | } |
56 | 62 | ||
57 | static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) { | 63 | static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) { |