diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2018-08-12 14:52:49 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2018-08-12 14:52:49 +0300 |
commit | dc2d841b7c50565302af2986d62ddbd29c332acd (patch) | |
tree | 324f234e56fde77fb80dfdef0c7c21f01968f71b /source/blender/editors/interface/interface_query.c | |
parent | 27b28e437d974ebbafa234205941c07aa0ab546c (diff) | |
parent | 4b6fa4d897a0bb3252b16383492b526d2cef3920 (diff) |
Merge branch 'blender2.8' into hair_guideshair_guides
Diffstat (limited to 'source/blender/editors/interface/interface_query.c')
-rw-r--r-- | source/blender/editors/interface/interface_query.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index 66f63fef82d..d0f7e1341de 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -109,11 +109,25 @@ bool ui_block_is_menu(const uiBlock *block) ((block->flag & UI_BLOCK_KEEP_OPEN) == 0)); } +bool ui_block_is_popover(const uiBlock *block) +{ + return (block->flag & UI_BLOCK_POPOVER) != 0; +} + bool ui_block_is_pie_menu(const uiBlock *block) { return ((block->flag & UI_BLOCK_RADIAL) != 0); } +bool ui_block_is_popup_any(const uiBlock *block) +{ + return ( + ui_block_is_menu(block) || + ui_block_is_popover(block) || + ui_block_is_pie_menu(block) + ); +} + bool UI_block_is_empty(const uiBlock *block) { for (const uiBut *but = block->buttons.first; but; but = but->next) { |