From 1ab7d1cb718103b42a1dbd2ddb4e7f5b2773dcbc Mon Sep 17 00:00:00 2001 From: Swarnim Arun Date: Thu, 2 Apr 2020 23:24:18 +0530 Subject: Deconstruct VSNodes for new Variant types --- modules/visual_script/visual_script_nodes.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 97c2686cd5..c860e08943 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -4184,9 +4184,12 @@ void register_visual_script_nodes() { VisualScriptLanguage::singleton->add_register_func("operators/logic/select", create_node_generic); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::VECTOR2), create_node_deconst_typed); + VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::VECTOR2I), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::VECTOR3), create_node_deconst_typed); + VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::VECTOR3I), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::COLOR), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::RECT2), create_node_deconst_typed); + VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::RECT2I), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::TRANSFORM2D), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::PLANE), create_node_deconst_typed); VisualScriptLanguage::singleton->add_register_func("functions/deconstruct/" + Variant::get_type_name(Variant::Type::QUAT), create_node_deconst_typed); -- cgit v1.2.3 From 971e12d61c9d2ac141c3c52444c1db2b113071b4 Mon Sep 17 00:00:00 2001 From: Swarnim Arun Date: Fri, 3 Apr 2020 05:07:35 +0530 Subject: VisualScript styling for new Variant Types --- modules/visual_script/visual_script_editor.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 30522930c7..7798b8bd2b 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -350,8 +350,11 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::STRING: color = Color(0.42, 0.65, 0.93); break; case Variant::VECTOR2: color = Color(0.74, 0.57, 0.95); break; + case Variant::VECTOR2I: color = Color(0.74, 0.57, 0.95); break; case Variant::RECT2: color = Color(0.95, 0.57, 0.65); break; + case Variant::RECT2I: color = Color(0.95, 0.57, 0.65); break; case Variant::VECTOR3: color = Color(0.84, 0.49, 0.93); break; + case Variant::VECTOR3I: color = Color(0.84, 0.49, 0.93); break; case Variant::TRANSFORM2D: color = Color(0.77, 0.93, 0.41); break; case Variant::PLANE: color = Color(0.97, 0.44, 0.44); break; case Variant::QUAT: color = Color(0.93, 0.41, 0.64); break; @@ -389,8 +392,11 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) { case Variant::STRING: color = Color(0.27, 0.56, 0.91); break; case Variant::VECTOR2: color = Color(0.68, 0.46, 0.93); break; + case Variant::VECTOR2I: color = Color(0.68, 0.46, 0.93); break; case Variant::RECT2: color = Color(0.93, 0.46, 0.56); break; + case Variant::RECT2I: color = Color(0.93, 0.46, 0.56); break; case Variant::VECTOR3: color = Color(0.86, 0.42, 0.93); break; + case Variant::VECTOR3I: color = Color(0.86, 0.42, 0.93); break; case Variant::TRANSFORM2D: color = Color(0.59, 0.81, 0.1); break; case Variant::PLANE: color = Color(0.97, 0.44, 0.44); break; case Variant::QUAT: color = Color(0.93, 0.41, 0.64); break; @@ -510,8 +516,11 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Control::get_theme_icon("float", "EditorIcons"), Control::get_theme_icon("String", "EditorIcons"), Control::get_theme_icon("Vector2", "EditorIcons"), + Control::get_theme_icon("Vector2i", "EditorIcons"), Control::get_theme_icon("Rect2", "EditorIcons"), + Control::get_theme_icon("Rect2i", "EditorIcons"), Control::get_theme_icon("Vector3", "EditorIcons"), + Control::get_theme_icon("Vector3i", "EditorIcons"), Control::get_theme_icon("Transform2D", "EditorIcons"), Control::get_theme_icon("Plane", "EditorIcons"), Control::get_theme_icon("Quat", "EditorIcons"), @@ -522,6 +531,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Control::get_theme_icon("NodePath", "EditorIcons"), Control::get_theme_icon("RID", "EditorIcons"), Control::get_theme_icon("MiniObject", "EditorIcons"), + Control::get_theme_icon("Callable", "EditorIcons"), + Control::get_theme_icon("Signal", "EditorIcons"), Control::get_theme_icon("Dictionary", "EditorIcons"), Control::get_theme_icon("Array", "EditorIcons"), Control::get_theme_icon("PackedByteArray", "EditorIcons"), @@ -974,8 +985,11 @@ void VisualScriptEditor::_update_members() { Control::get_theme_icon("float", "EditorIcons"), Control::get_theme_icon("String", "EditorIcons"), Control::get_theme_icon("Vector2", "EditorIcons"), + Control::get_theme_icon("Vector2i", "EditorIcons"), Control::get_theme_icon("Rect2", "EditorIcons"), + Control::get_theme_icon("Rect2i", "EditorIcons"), Control::get_theme_icon("Vector3", "EditorIcons"), + Control::get_theme_icon("Vector3i", "EditorIcons"), Control::get_theme_icon("Transform2D", "EditorIcons"), Control::get_theme_icon("Plane", "EditorIcons"), Control::get_theme_icon("Quat", "EditorIcons"), @@ -986,6 +1000,8 @@ void VisualScriptEditor::_update_members() { Control::get_theme_icon("NodePath", "EditorIcons"), Control::get_theme_icon("RID", "EditorIcons"), Control::get_theme_icon("MiniObject", "EditorIcons"), + Control::get_theme_icon("Callable", "EditorIcons"), + Control::get_theme_icon("Signal", "EditorIcons"), Control::get_theme_icon("Dictionary", "EditorIcons"), Control::get_theme_icon("Array", "EditorIcons"), Control::get_theme_icon("PackedByteArray", "EditorIcons"), -- cgit v1.2.3