-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
This commit is contained in:
@@ -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() {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user