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:
authorMatt Ebb <matt@mke3.net>2009-12-16 13:13:26 +0300
committerMatt Ebb <matt@mke3.net>2009-12-16 13:13:26 +0300
commit3455261e173bf812c08c430de1237202ceb13ba0 (patch)
tree45c18556c7c3e396a29b817d77facfcde09c2ae7 /source/blender/makesrna/intern/rna_ui_api.c
parent0095b89a67855a4f9336a47dd1863e1ec8c7e5be (diff)
First version of updated key map editor UI (in User Preferences)
Now the key maps are displayed in a hierarchical list which you can browse through. As well as in the main list, modal key maps are also available in context, for example, if you unfold out a Transform key map item, you'll be able to fold out and access its modal key map underneath. More work to do, including search, better operator browsing, etc. Still need to revise the ordering/hierarchy and clean up naming to be consistent too, it's a bit of an 'evolved' mess right now. Thanks to theeth for some initial work here too.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 0955ec1c581..67383074497 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -37,7 +37,7 @@
#ifdef RNA_RUNTIME
-static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle, int icon_only, int event, int full_event, int index)
+static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle, int icon_only, int event, int full_event, int no_bg, int index)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
int flag= 0;
@@ -53,6 +53,7 @@ static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr,
flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0;
flag |= (event)? UI_ITEM_R_EVENT: 0;
flag |= (full_event)? UI_ITEM_R_FULL_EVENT: 0;
+ flag |= (no_bg)? UI_ITEM_R_NO_BG: 0;
uiItemFullR(layout, name, icon, ptr, prop, index, 0, flag);
}
@@ -157,6 +158,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text.");
RNA_def_boolean(func, "event", 0, "", "Use button to input key events.");
RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers.");
+ RNA_def_boolean(func, "no_bg", 0, "", "Don't draw the button itself, just the icon/text.");
RNA_def_int(func, "index", -1, -2, INT_MAX, "", "The index of this button, when set a single member of an array can be accessed, when set to -1 all array members are used.", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
func= RNA_def_function(srna, "props_enum", "uiItemsEnumR");
@@ -249,7 +251,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
-
+
/* templates */
func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);