1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Merge pull request #60552 from madmiraal/implement-3466-3.x

[3.x] Add a method for obtaining display cutouts on Android
This commit is contained in:
Rémi Verschelde
2022-05-02 07:58:05 +02:00
committed by GitHub
9 changed files with 68 additions and 0 deletions

View File

@@ -355,6 +355,10 @@ Rect2 _OS::get_window_safe_area() const {
return OS::get_singleton()->get_window_safe_area();
}
Array _OS::get_display_cutouts() const {
return OS::get_singleton()->get_display_cutouts();
}
void _OS::set_window_fullscreen(bool p_enabled) {
OS::get_singleton()->set_window_fullscreen(p_enabled);
}
@@ -1285,6 +1289,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_min_window_size", "size"), &_OS::set_min_window_size);
ClassDB::bind_method(D_METHOD("set_window_size", "size"), &_OS::set_window_size);
ClassDB::bind_method(D_METHOD("get_window_safe_area"), &_OS::get_window_safe_area);
ClassDB::bind_method(D_METHOD("get_display_cutouts"), &_OS::get_display_cutouts);
ClassDB::bind_method(D_METHOD("set_window_fullscreen", "enabled"), &_OS::set_window_fullscreen);
ClassDB::bind_method(D_METHOD("is_window_fullscreen"), &_OS::is_window_fullscreen);
ClassDB::bind_method(D_METHOD("set_window_resizable", "enabled"), &_OS::set_window_resizable);