diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 7ce9155e3d9..5a001f05b53 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -101,7 +101,8 @@ static void rna_uiItemR(uiLayout *layout, bool full_event, bool emboss, int index, - int icon_value) + int icon_value, + bool invert_checkbox) { PropertyRNA *prop = RNA_struct_find_property(ptr, propname); int flag = 0; @@ -125,6 +126,7 @@ static void rna_uiItemR(uiLayout *layout, flag |= (event) ? UI_ITEM_R_EVENT : 0; flag |= (full_event) ? UI_ITEM_R_FULL_EVENT : 0; flag |= (emboss) ? 0 : UI_ITEM_R_NO_BG; + flag |= (invert_checkbox) ? UI_ITEM_R_CHECKBOX_INVERT : 0; uiItemFullR(layout, ptr, prop, index, 0, flag, name, icon); } @@ -789,6 +791,7 @@ void RNA_api_ui_layout(StructRNA *srna) INT_MAX); /* RNA_NO_INDEX == -1 */ parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); + RNA_def_boolean(func, "invert_checkbox", false, "", "Draw checkbox value inverted"); func = RNA_def_function(srna, "props_enum", "uiItemsEnumR"); api_ui_item_rna_common(func); |