diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-07-22 19:23:48 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-07-22 21:50:35 +0300 |
commit | 618eb27e8b1d3a00fd5a809a0a998d4e0f10e1b7 (patch) | |
tree | 97babcc5cddd671f5d0ecc44811e11210ce65974 /core/core_bind.cpp | |
parent | 5de991d57c44d68221c68cf4996831a3b6a3e9e1 (diff) | |
download | redot-engine-618eb27e8b1d3a00fd5a809a0a998d4e0f10e1b7.tar.gz |
Move `alert` function from `DisplayServer` to `OS`.
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r-- | core/core_bind.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 9a58528bd7..8ec934db62 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -196,6 +196,10 @@ int _OS::get_low_processor_usage_mode_sleep_usec() const { return OS::get_singleton()->get_low_processor_usage_mode_sleep_usec(); } +void _OS::alert(const String &p_alert, const String &p_title) { + OS::get_singleton()->alert(p_alert, p_title); +} + String _OS::get_executable_path() const { return OS::get_singleton()->get_executable_path(); } @@ -487,6 +491,8 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("open_midi_inputs"), &_OS::open_midi_inputs); ClassDB::bind_method(D_METHOD("close_midi_inputs"), &_OS::close_midi_inputs); + ClassDB::bind_method(D_METHOD("alert", "text", "title"), &_OS::alert, DEFVAL("Alert!")); + ClassDB::bind_method(D_METHOD("set_low_processor_usage_mode", "enable"), &_OS::set_low_processor_usage_mode); ClassDB::bind_method(D_METHOD("is_in_low_processor_usage_mode"), &_OS::is_in_low_processor_usage_mode); |