From 3dd722d92f2c8a750065e23188c0cd7fba4fb2d7 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 17 May 2016 23:27:35 +0900 Subject: Scenetree Nodes drag and drop visual representation fixes #4684 --- tools/editor/scene_tree_editor.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index 22b6cdfb5d..7b07f72984 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -834,15 +834,22 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2& p_point,Control* p_from) VBoxContainer *vb = memnew( VBoxContainer ); Array objs; + int list_max = 10; + float opacity_step = 1.0f / list_max; + float opacity_item = 1.0f; for(int i=0;iset_texture(icons[i]); - hb->add_child(tf); - Label *label = memnew( Label( selected[i]->get_name() ) ); - hb->add_child(label); - vb->add_child(hb); + if (iset_texture(icons[i]); + hb->add_child(tf); + Label *label = memnew( Label( selected[i]->get_name() ) ); + hb->add_child(label); + vb->add_child(hb); + hb->set_opacity(opacity_item); + opacity_item -= opacity_step; + } NodePath p = selected[i]->get_path(); objs.push_back(p); } -- cgit v1.2.3