summaryrefslogtreecommitdiffstats
path: root/scene/3d/spatial_sample_player.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-05-17 18:27:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-05-17 18:28:44 -0300
commitc195c0df6b36debc870216dd42e49fbda70fa861 (patch)
tree194a26e39ace86d7a471f3e86159c2aed6be261c /scene/3d/spatial_sample_player.cpp
parent3a26e14a2bab777c9ba6aedceff6e4ef2666faf0 (diff)
downloadredot-engine-c195c0df6b36debc870216dd42e49fbda70fa861.tar.gz
-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
Diffstat (limited to 'scene/3d/spatial_sample_player.cpp')
-rw-r--r--scene/3d/spatial_sample_player.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/3d/spatial_sample_player.cpp b/scene/3d/spatial_sample_player.cpp
index 7114fd4b77..0df921f208 100644
--- a/scene/3d/spatial_sample_player.cpp
+++ b/scene/3d/spatial_sample_player.cpp
@@ -104,6 +104,7 @@ void SpatialSamplePlayer::set_sample_library(const Ref<SampleLibrary>& p_library
library=p_library;
_change_notify();
+ update_configuration_warning();
}
Ref<SampleLibrary> SpatialSamplePlayer::get_sample_library() const {
@@ -190,6 +191,16 @@ void SpatialSamplePlayer::stop_all() {
}
}
+String SpatialSamplePlayer::get_configuration_warning() const {
+
+ if (library.is_null()) {
+ return TTR("A SampleLibrary resource must be created or set in the 'samples' property in order for SpatialSamplePlayer to play sound.");
+ }
+
+ return String();
+}
+
+
void SpatialSamplePlayer::_bind_methods() {