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/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 57102f4ad50..52ea0a99762 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1321,7 +1321,7 @@ void uiItemM(uiLayout *layout, bContext *C, char *name, int icon, char *menuname
}
/* label item */
-void uiItemL(uiLayout *layout, char *name, int icon)
+static uiBut *uiItemL_(uiLayout *layout, char *name, int icon)
{
uiBlock *block= layout->root->block;
uiBut *but;
@@ -1342,8 +1342,25 @@ void uiItemL(uiLayout *layout, char *name, int icon)
but= uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
else
but= uiDefBut(block, LABEL, 0, (char*)name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+
+ return but;
+}
+
+void uiItemL(uiLayout *layout, char *name, int icon)
+{
+ uiItemL_(layout, name, icon);
+}
+
+void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, char *name, int icon)
+{
+ uiBut *but= uiItemL_(layout, name, icon);
+
+ if(ptr && ptr->type)
+ if(RNA_struct_is_ID(ptr->type))
+ uiButSetDragID(but, ptr->id.data);
}
+
/* value item */
void uiItemV(uiLayout *layout, char *name, int icon, int argval)
{