diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2021-09-16 15:28:20 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2021-09-16 17:51:51 -0400 |
commit | f3a564f9a5bf7f5a9c99253b7d9ac37fb65bff8e (patch) | |
tree | 1c69b67416382df32ff0aae33f5eaadd01840e6a /editor/plugins | |
parent | 3581b893ed2dc1e444618ac40dc26dd58fe1219a (diff) |
Rename Listener2D/Listener3D to AudioListener2D/AudioListener3D
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_gizmos.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_gizmos.h | 6 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 2 |
3 files changed, 14 insertions, 14 deletions
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<Listener3D>(p_spatial) != nullptr; +bool AudioListener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<AudioListener3D>(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<Material> icon = get_material("listener_3d_icon", p_gizmo); +void AudioListener3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + const Ref<Material> 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<Camera3DGizmoPlugin>(memnew(Camera3DGizmoPlugin))); add_gizmo_plugin(Ref<Light3DGizmoPlugin>(memnew(Light3DGizmoPlugin))); add_gizmo_plugin(Ref<AudioStreamPlayer3DGizmoPlugin>(memnew(AudioStreamPlayer3DGizmoPlugin))); - add_gizmo_plugin(Ref<Listener3DGizmoPlugin>(memnew(Listener3DGizmoPlugin))); + add_gizmo_plugin(Ref<AudioListener3DGizmoPlugin>(memnew(AudioListener3DGizmoPlugin))); add_gizmo_plugin(Ref<MeshInstance3DGizmoPlugin>(memnew(MeshInstance3DGizmoPlugin))); add_gizmo_plugin(Ref<OccluderInstance3DGizmoPlugin>(memnew(OccluderInstance3DGizmoPlugin))); add_gizmo_plugin(Ref<SoftDynamicBody3DGizmoPlugin>(memnew(SoftDynamicBody3DGizmoPlugin))); |