diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-07-23 19:27:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 19:27:31 +0200 |
commit | eefc67a810975cb99343554c981968ea5ae2fd3e (patch) | |
tree | f475726e88352b299573211c1564d9cda293c153 /core/core_bind.cpp | |
parent | 9b034c930467606a7696d93020838c4f0c5f01e2 (diff) | |
parent | 618eb27e8b1d3a00fd5a809a0a998d4e0f10e1b7 (diff) | |
download | redot-engine-eefc67a810975cb99343554c981968ea5ae2fd3e.tar.gz |
Merge pull request #50747 from bruvzg/move_alert_to_os
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); |