summaryrefslogtreecommitdiff
path: root/src/ui/labelwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 18:24:21 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 18:24:21 +0300
commit35b5ff92a5ab7d49bde2e572fc8d5de5367fb0db (patch)
treea01358d226390674fec1765a3feda99d08eca94f /src/ui/labelwidget.c
parentca17138cf54ee42792628269a77cc45a44b8e8dc (diff)
Radio button widget flag
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r--src/ui/labelwidget.c6
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
53static void trigger_LabelWidget_(const iLabelWidget *d) { 53static 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
57static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) { 63static iBool processEvent_LabelWidget_(iLabelWidget *d, const SDL_Event *ev) {