diff options
Diffstat (limited to 'src/ui/util.h')
-rw-r--r-- | src/ui/util.h | 8 |
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 | |||
82 | void openMenu_Widget (iWidget *, iInt2 coord); | 82 | void openMenu_Widget (iWidget *, iInt2 coord); |
83 | void closeMenu_Widget (iWidget *); | 83 | void closeMenu_Widget (iWidget *); |
84 | 84 | ||
85 | int 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 | |||
85 | iLabelWidget * makeMenuButton_LabelWidget (const char *label, const iMenuItem *items, size_t n); | 93 | iLabelWidget * makeMenuButton_LabelWidget (const char *label, const iMenuItem *items, size_t n); |
86 | 94 | ||
87 | /*-----------------------------------------------------------------------------------------------*/ | 95 | /*-----------------------------------------------------------------------------------------------*/ |