diff options
author | Yevgeny Makarov <jenkm> | 2020-02-28 15:51:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-02-28 15:57:32 +0300 |
commit | e287122af6ca2bb4b60ac938b5ac8a3f1354cad9 (patch) | |
tree | 9d220cfc9cfc8d8cdecb15d34418c97b8485005b /source/blender/editors/interface/interface_layout.c | |
parent | 318112379d6d251334b8f3d2a20b935210446b4f (diff) |
UI: improve label text colors in save and security popups
This adds a utility functions to draw a label highlighted or in red.
Differential Revision: https://developer.blender.org/D6934
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 15 |
1 files changed, 15 insertions, 0 deletions
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); |