diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-09-11 22:47:33 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-09-15 20:44:45 +0200 |
commit | 5345cf3e756e3084c227a823a1e31a8b9716d584 (patch) | |
tree | f0487e87a80cbeaa754eeeca065a62eedbc41ef8 /editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp | |
parent | 221884e6bc260c38f16422081b7d4efd49a71375 (diff) | |
download | redot-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/fog_volume_gizmo_plugin.cpp')
-rw-r--r-- | editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp index 8f7cbee405..931a738aa2 100644 --- a/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/fog_volume_gizmo_plugin.cpp @@ -30,7 +30,9 @@ #include "fog_volume_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/fog_volume.h" @@ -41,6 +43,8 @@ FogVolumeGizmoPlugin::FogVolumeGizmoPlugin() { gizmo_color.a = 0.15; create_material("shape_material_internal", gizmo_color); + create_icon_material("fog_volume_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoFogVolume"), EditorStringName(EditorIcons))); + create_handle_material("handles"); } @@ -143,6 +147,8 @@ void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_lines(lines, material); p_gizmo->add_collision_segments(lines); + const Ref<Material> icon = get_material("fog_volume_icon", p_gizmo); + p_gizmo->add_unscaled_billboard(icon, 0.05); p_gizmo->add_handles(handles, handles_material); } } |