summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-17 22:19:44 +0100
committerGitHub <noreply@github.com>2017-12-17 22:19:44 +0100
commit19a8f409c1d072fa3ffe64d5643f617bbb9fc15c (patch)
tree8be00984b80c4c609c0f31793cb269a6d802cddc
parentcd6fb0eb4e79d7964f1116cdd8c5dfeafe389bfa (diff)
parentc8c280a68a3f9f513ba4d61f32e6a9c775728dc2 (diff)
Merge pull request #14782 from djrm/pr_visual_improvements
Now every variant type has its icon.
-rw-r--r--editor/icons/SCsub3
-rw-r--r--editor/icons/icon_a_a_b_b.svg (renamed from editor/icons/icon_aabb.svg)0
-rw-r--r--editor/icons/icon_nil.svg3
-rw-r--r--modules/visual_script/visual_script_editor.cpp16
4 files changed, 14 insertions, 8 deletions
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index e28c229a38..0e4a4796ec 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -49,6 +49,9 @@ def make_editor_icons_action(target, source, env):
fname = str(f)
icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ # some special cases
+ if icon_name in ['Int', 'Bool', 'Float']:
+ icon_name = icon_name.lower()
if icon_name.endswith("MediumThumb"): # dont know a better way to handle this
thumb_medium_indices.append(str(index))
if icon_name.endswith("BigThumb"): # dont know a better way to handle this
diff --git a/editor/icons/icon_aabb.svg b/editor/icons/icon_a_a_b_b.svg
index 1af05f9b68..1af05f9b68 100644
--- a/editor/icons/icon_aabb.svg
+++ b/editor/icons/icon_a_a_b_b.svg
diff --git a/editor/icons/icon_nil.svg b/editor/icons/icon_nil.svg
new file mode 100644
index 0000000000..b266161c2b
--- /dev/null
+++ b/editor/icons/icon_nil.svg
@@ -0,0 +1,3 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h2v-2zm4 0v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-9.6e-6 -0.99999-0.44772-1-1v-5zm-11 2v6h2v-4h1c0.55228 9.6e-6 0.99999 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3zm7 2v4h2v-4z" fill="#e0e0e0"/>
+</svg>
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 0bb235436e..b91042ec46 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -481,9 +481,9 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("Variant", "EditorIcons"),
- Control::get_icon("Bool", "EditorIcons"),
- Control::get_icon("Int", "EditorIcons"),
- Control::get_icon("Float", "EditorIcons"),
+ Control::get_icon("bool", "EditorIcons"),
+ Control::get_icon("int", "EditorIcons"),
+ Control::get_icon("float", "EditorIcons"),
Control::get_icon("String", "EditorIcons"),
Control::get_icon("Vector2", "EditorIcons"),
Control::get_icon("Rect2", "EditorIcons"),
@@ -491,7 +491,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("Transform2D", "EditorIcons"),
Control::get_icon("Plane", "EditorIcons"),
Control::get_icon("Quat", "EditorIcons"),
- Control::get_icon("Aabb", "EditorIcons"),
+ Control::get_icon("AABB", "EditorIcons"),
Control::get_icon("Basis", "EditorIcons"),
Control::get_icon("Transform", "EditorIcons"),
Control::get_icon("Color", "EditorIcons"),
@@ -775,9 +775,9 @@ void VisualScriptEditor::_update_members() {
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("Variant", "EditorIcons"),
- Control::get_icon("Bool", "EditorIcons"),
- Control::get_icon("Int", "EditorIcons"),
- Control::get_icon("Float", "EditorIcons"),
+ Control::get_icon("bool", "EditorIcons"),
+ Control::get_icon("int", "EditorIcons"),
+ Control::get_icon("float", "EditorIcons"),
Control::get_icon("String", "EditorIcons"),
Control::get_icon("Vector2", "EditorIcons"),
Control::get_icon("Rect2", "EditorIcons"),
@@ -785,7 +785,7 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("Transform2D", "EditorIcons"),
Control::get_icon("Plane", "EditorIcons"),
Control::get_icon("Quat", "EditorIcons"),
- Control::get_icon("Aabb", "EditorIcons"),
+ Control::get_icon("AABB", "EditorIcons"),
Control::get_icon("Basis", "EditorIcons"),
Control::get_icon("Transform", "EditorIcons"),
Control::get_icon("Color", "EditorIcons"),