summaryrefslogtreecommitdiffstats
path: root/editor/plugins/gizmos/decal_gizmo_plugin.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2023-09-11 22:47:33 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-09-15 20:44:45 +0200
commit5345cf3e756e3084c227a823a1e31a8b9716d584 (patch)
treef0487e87a80cbeaa754eeeca065a62eedbc41ef8 /editor/plugins/gizmos/decal_gizmo_plugin.cpp
parent221884e6bc260c38f16422081b7d4efd49a71375 (diff)
downloadredot-engine-5345cf3e756e3084c227a823a1e31a8b9716d584.tar.gz
Add 3D editor gizmo icons for Decal, LightmapProbe and FogVolume
- Tweak CPUParticles3D editor gizmo icon to use the same outline color as other gizmo icons. Make the internal icon easier to see by using an orange color instead of gray. Co-authored-by: MewPurPur <mew.pur.pur@abv.bg>
Diffstat (limited to 'editor/plugins/gizmos/decal_gizmo_plugin.cpp')
-rw-r--r--editor/plugins/gizmos/decal_gizmo_plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/gizmos/decal_gizmo_plugin.cpp b/editor/plugins/gizmos/decal_gizmo_plugin.cpp
index b439598ef4..c91afa4c74 100644
--- a/editor/plugins/gizmos/decal_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/decal_gizmo_plugin.cpp
@@ -30,7 +30,9 @@
#include "decal_gizmo_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_settings.h"
+#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "scene/3d/decal.h"
@@ -38,6 +40,8 @@
DecalGizmoPlugin::DecalGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/decal", Color(0.6, 0.5, 1.0));
+ create_icon_material("decal_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoDecal"), EditorStringName(EditorIcons)));
+
create_material("decal_material", gizmo_color);
create_handle_material("handles");
@@ -162,7 +166,9 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
Ref<Material> material = get_material("decal_material", p_gizmo);
+ const Ref<Material> icon = get_material("decal_icon", p_gizmo);
p_gizmo->add_lines(lines, material);
+ p_gizmo->add_unscaled_billboard(icon, 0.05);
p_gizmo->add_handles(handles, get_material("handles"));
}