Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_button_group.c
| Show All 22 Lines | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "interface_intern.h" | #include "interface_intern.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Button Groups | /** \name Button Groups | ||||
| * \{ */ | * \{ */ | ||||
| /** | |||||
| * Every function that adds a set of buttons must create another group, | |||||
| * then #ui_def_but adds buttons to the current group (the last). | |||||
| */ | |||||
| void ui_block_new_button_group(uiBlock *block, uiButtonGroupFlag flag) | void ui_block_new_button_group(uiBlock *block, uiButtonGroupFlag flag) | ||||
| { | { | ||||
| /* Don't create a new group if there is a "lock" on new groups. */ | /* Don't create a new group if there is a "lock" on new groups. */ | ||||
| if (!BLI_listbase_is_empty(&block->button_groups)) { | if (!BLI_listbase_is_empty(&block->button_groups)) { | ||||
| uiButtonGroup *last_button_group = block->button_groups.last; | uiButtonGroup *last_button_group = block->button_groups.last; | ||||
| if (last_button_group->flag & UI_BUTTON_GROUP_LOCK) { | if (last_button_group->flag & UI_BUTTON_GROUP_LOCK) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||