diff --git a/project/addons/orchestrator/editor/icons/CircleReference.svg b/project/addons/orchestrator/editor/icons/CircleReference.svg new file mode 100644 index 00000000..193a4333 --- /dev/null +++ b/project/addons/orchestrator/editor/icons/CircleReference.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/addons/orchestrator/editor/icons/CircleReference.svg.import b/project/addons/orchestrator/editor/icons/CircleReference.svg.import new file mode 100644 index 00000000..28d88e6b --- /dev/null +++ b/project/addons/orchestrator/editor/icons/CircleReference.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bo6446fycy5n" +path="res://.godot/imported/CircleReference.svg-452a6b59c24b710639430d28505145ae.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/orchestrator/editor/icons/CircleReference.svg" +dest_files=["res://.godot/imported/CircleReference.svg-452a6b59c24b710639430d28505145ae.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project/addons/orchestrator/editor/icons/CircleValue.svg b/project/addons/orchestrator/editor/icons/CircleValue.svg new file mode 100644 index 00000000..1afe76a6 --- /dev/null +++ b/project/addons/orchestrator/editor/icons/CircleValue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/addons/orchestrator/editor/icons/CircleValue.svg.import b/project/addons/orchestrator/editor/icons/CircleValue.svg.import new file mode 100644 index 00000000..7e799d81 --- /dev/null +++ b/project/addons/orchestrator/editor/icons/CircleValue.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bfk8ej2o0dgcf" +path="res://.godot/imported/CircleValue.svg-587a193410954141d7def4c437a0e723.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/orchestrator/editor/icons/CircleValue.svg" +dest_files=["res://.godot/imported/CircleValue.svg-587a193410954141d7def4c437a0e723.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/src/common/scene_utils.cpp b/src/common/scene_utils.cpp index 72551992..0a087a97 100644 --- a/src/common/scene_utils.cpp +++ b/src/common/scene_utils.cpp @@ -76,6 +76,11 @@ namespace SceneUtils return vbox->get_theme_color(p_color_name, p_category); } + Ref get_icon(const String& p_name) + { + return ResourceLoader::get_singleton()->load(vformat("res://addons/orchestrator/editor/icons/%s.svg", p_name)); + } + Ref get_editor_icon(const String& p_icon_name) { VBoxContainer* vbox = OrchestratorPlugin::get_singleton()->get_editor_interface()->get_editor_main_screen(); diff --git a/src/common/scene_utils.h b/src/common/scene_utils.h index c06c7ade..93c6e9a1 100644 --- a/src/common/scene_utils.h +++ b/src/common/scene_utils.h @@ -41,6 +41,11 @@ namespace SceneUtils /// @return the editor color Color get_editor_color(const String& p_color_name, const String& p_category = "Editor"); + /// Gets an Orchestrator editor icon + /// @param p_name the icon name + /// @return a reference to the icon + Ref get_icon(const String& p_name); + /// Load an icon. /// /// @param p_icon_name the editor icon to load diff --git a/src/editor/inspector/property_info_container_property.cpp b/src/editor/inspector/property_info_container_property.cpp index f70a4dee..eb54e18a 100644 --- a/src/editor/inspector/property_info_container_property.cpp +++ b/src/editor/inspector/property_info_container_property.cpp @@ -51,12 +51,12 @@ void OrchestratorPropertyInfoContainerEditorProperty::_update_pass_by_details(in if (PropertyUtils::is_passed_by_reference(p_property)) { - pass_by->set_button_icon(SceneUtils::get_editor_icon("KeyXScale")); + pass_by->set_button_icon(SceneUtils::get_icon("CircleReference")); pass_by->set_tooltip_text("Property is passed by reference"); } else { - pass_by->set_button_icon(SceneUtils::get_editor_icon("KeyValue")); + pass_by->set_button_icon(SceneUtils::get_icon("CircleValue")); pass_by->set_tooltip_text("Property is passed by value"); } }