summaryrefslogtreecommitdiff
path: root/src/ui/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/util.h')
-rw-r--r--src/ui/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/util.h b/src/ui/util.h
index 04683a2f..3181ea3f 100644
--- a/src/ui/util.h
+++ b/src/ui/util.h
@@ -82,6 +82,14 @@ iWidget * makeMenu_Widget (iWidget *parent, const iMenuItem *items, size_t
82void openMenu_Widget (iWidget *, iInt2 coord); 82void openMenu_Widget (iWidget *, iInt2 coord);
83void closeMenu_Widget (iWidget *); 83void closeMenu_Widget (iWidget *);
84 84
85int checkContextMenu_Widget (iWidget *, const SDL_Event *ev); /* see macro below */
86
87#define processContextMenuEvent_Widget(menu, sdlEvent) \
88 for (const int result = checkContextMenu_Widget((menu), (sdlEvent));;) { \
89 if (result) return result >> 1; \
90 break; \
91 }
92
85iLabelWidget * makeMenuButton_LabelWidget (const char *label, const iMenuItem *items, size_t n); 93iLabelWidget * makeMenuButton_LabelWidget (const char *label, const iMenuItem *items, size_t n);
86 94
87/*-----------------------------------------------------------------------------------------------*/ 95/*-----------------------------------------------------------------------------------------------*/