diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-29 18:58:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-29 21:04:07 +0300 |
commit | b5667c2ca7f7cc33903b7f664dfbd3bccd8cdd22 (patch) | |
tree | 189f7a60d860c563c6abf37899aae3fcf85c46cf /source/blender/makesrna/intern | |
parent | 4c7f08e5ebc107e13501a5b1e82a44edeaf7b7c3 (diff) |
UI: allow off/on icons to be in reverse order.
The same icons are reused for "hide" and "show" properties, which need
to be in reverse order compared to each other.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index c3c7367283e..42db80c83c0 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1426,11 +1426,13 @@ void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *d prop->description = description; } -void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, bool consecutive) +void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive) { prop->icon = icon; - if (consecutive) + if (consecutive != 0) prop->flag |= PROP_ICONS_CONSECUTIVE; + if (consecutive < 0) + prop->flag |= PROP_ICONS_REVERSE; } /** |