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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/interface/interface_layout.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 74ecff22243..554a166b2ce 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -2283,6 +2283,8 @@ void uiItemsFullEnumO_items(uiLayout *layout,
int totitem);
void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
+void uiItemL_ex(
+ uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert);
uiLayout *uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon);
/* label icon for dragging */
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 64c0e11976b..91b56177eac 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2957,6 +2957,21 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon)
return but;
}
+void uiItemL_ex(
+ uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert)
+{
+ uiBut *but = uiItemL_(layout, name, icon);
+
+ if (highlight) {
+ /* TODO: add another flag for this. */
+ UI_but_flag_enable(but, UI_SELECT_DRAW);
+ }
+
+ if (redalert) {
+ UI_but_flag_enable(but, UI_BUT_REDALERT);
+ }
+}
+
void uiItemL(uiLayout *layout, const char *name, int icon)
{
uiItemL_(layout, name, icon);