From f3a564f9a5bf7f5a9c99253b7d9ac37fb65bff8e Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Thu, 16 Sep 2021 15:28:20 -0400 Subject: Rename Listener2D/Listener3D to AudioListener2D/AudioListener3D --- editor/plugins/node_3d_editor_gizmos.cpp | 20 ++++++++++---------- editor/plugins/node_3d_editor_gizmos.h | 6 +++--- editor/plugins/node_3d_editor_plugin.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index c2ba987cd7..33c30db006 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -34,6 +34,7 @@ #include "core/math/geometry_2d.h" #include "core/math/geometry_3d.h" #include "editor/plugins/node_3d_editor_plugin.h" +#include "scene/3d/audio_listener_3d.h" #include "scene/3d/audio_stream_player_3d.h" #include "scene/3d/camera_3d.h" #include "scene/3d/collision_polygon_3d.h" @@ -45,7 +46,6 @@ #include "scene/3d/light_3d.h" #include "scene/3d/lightmap_gi.h" #include "scene/3d/lightmap_probe.h" -#include "scene/3d/listener_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/navigation_region_3d.h" #include "scene/3d/occluder_instance_3d.h" @@ -1619,24 +1619,24 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { ////// -Listener3DGizmoPlugin::Listener3DGizmoPlugin() { - create_icon_material("listener_3d_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoListener3D", "EditorIcons")); +AudioListener3DGizmoPlugin::AudioListener3DGizmoPlugin() { + create_icon_material("audio_listener_3d_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoAudioListener3D", "EditorIcons")); } -bool Listener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to(p_spatial) != nullptr; +bool AudioListener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to(p_spatial) != nullptr; } -String Listener3DGizmoPlugin::get_gizmo_name() const { - return "Listener3D"; +String AudioListener3DGizmoPlugin::get_gizmo_name() const { + return "AudioListener3D"; } -int Listener3DGizmoPlugin::get_priority() const { +int AudioListener3DGizmoPlugin::get_priority() const { return -1; } -void Listener3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - const Ref icon = get_material("listener_3d_icon", p_gizmo); +void AudioListener3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + const Ref icon = get_material("audio_listener_3d_icon", p_gizmo); p_gizmo->add_unscaled_billboard(icon, 0.05); } diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 67f54562b1..24b4a23d4b 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -249,8 +249,8 @@ public: AudioStreamPlayer3DGizmoPlugin(); }; -class Listener3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(Listener3DGizmoPlugin, EditorNode3DGizmoPlugin); +class AudioListener3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(AudioListener3DGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial) override; @@ -259,7 +259,7 @@ public: void redraw(EditorNode3DGizmo *p_gizmo) override; - Listener3DGizmoPlugin(); + AudioListener3DGizmoPlugin(); }; class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin { diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 1b725d5d3a..5263352502 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6863,7 +6863,7 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref(memnew(Camera3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(Light3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(AudioStreamPlayer3DGizmoPlugin))); - add_gizmo_plugin(Ref(memnew(Listener3DGizmoPlugin))); + add_gizmo_plugin(Ref(memnew(AudioListener3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(MeshInstance3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(OccluderInstance3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(SoftDynamicBody3DGizmoPlugin))); -- cgit v1.2.3