Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-11-01 21:00:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-01 21:02:56 +0300
commita6e1f7560fa4e6308a83d42d701a1b95d7db38a8 (patch)
tree7125f878cca661077b9e0bdd76c1c7ba953ccbdc /source/blender/editors
parent3ec4d0b51bf3a76725e39a57b0f30bec3edc6882 (diff)
UI: Option to draw button pressed
Needed to show the active tool
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/UI_interface.h1
-rw-r--r--source/blender/editors/interface/interface_layout.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index a609a3b51fd..a0664f020bf 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -832,6 +832,7 @@ void UI_exit(void);
#define UI_ITEM_R_FULL_EVENT (1 << 6)
#define UI_ITEM_R_NO_BG (1 << 7)
#define UI_ITEM_R_IMMEDIATE (1 << 8)
+#define UI_ITEM_O_DEPRESS (1 << 9)
/* uiTemplateOperatorPropertyButs flags */
#define UI_TEMPLATE_OP_PROPS_SHOW_TITLE 1
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 33dc74cbe23..936b4fd2bba 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -845,6 +845,10 @@ static uiBut *uiItemFullO_ptr_ex(
if (flag & UI_ITEM_R_NO_BG)
UI_block_emboss_set(block, UI_EMBOSS);
+ if (flag & UI_ITEM_O_DEPRESS) {
+ but->flag |= UI_SELECT;
+ }
+
if (layout->redalert)
UI_but_flag_enable(but, UI_BUT_REDALERT);