1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #33967 from Calinou/add-os-is-window-focused

Add an `OS.is_window_focused()` getter
This commit is contained in:
Rémi Verschelde
2020-01-06 11:39:18 +01:00
committed by GitHub
10 changed files with 50 additions and 5 deletions

View File

@@ -400,6 +400,10 @@ bool _OS::is_window_always_on_top() const {
return OS::get_singleton()->is_window_always_on_top();
}
bool _OS::is_window_focused() const {
return OS::get_singleton()->is_window_focused();
}
void _OS::set_borderless_window(bool p_borderless) {
OS::get_singleton()->set_borderless_window(p_borderless);
}
@@ -1226,6 +1230,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_window_maximized"), &_OS::is_window_maximized);
ClassDB::bind_method(D_METHOD("set_window_always_on_top", "enabled"), &_OS::set_window_always_on_top);
ClassDB::bind_method(D_METHOD("is_window_always_on_top"), &_OS::is_window_always_on_top);
ClassDB::bind_method(D_METHOD("is_window_focused"), &_OS::is_window_focused);
ClassDB::bind_method(D_METHOD("request_attention"), &_OS::request_attention);
ClassDB::bind_method(D_METHOD("get_real_window_size"), &_OS::get_real_window_size);
ClassDB::bind_method(D_METHOD("center_window"), &_OS::center_window);