summaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-04-11 10:40:58 +0200
committerGitHub <noreply@github.com>2018-04-11 10:40:58 +0200
commitd87307d850186d27d2c27c5916ec8c4744c14979 (patch)
treeac92fff83829becd823aea985c923740d73119e6 /core/bind
parent4d787869e189b670d609f33c308991741592e40a (diff)
parent1d9a3a9b1c9ef7db26e53c8aeaab731992cffd6e (diff)
Merge pull request #18106 from endragor/iphone-x
iPhone X support and iOS-related fixes
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp5
-rw-r--r--core/bind/core_bind.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index a977fd3da4..85793f127d 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -288,6 +288,10 @@ void _OS::set_window_size(const Size2 &p_size) {
OS::get_singleton()->set_window_size(p_size);
}
+Rect2 _OS::get_window_safe_area() const {
+ return OS::get_singleton()->get_window_safe_area();
+}
+
void _OS::set_window_fullscreen(bool p_enabled) {
OS::get_singleton()->set_window_fullscreen(p_enabled);
}
@@ -1046,6 +1050,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_window_position", "position"), &_OS::set_window_position);
ClassDB::bind_method(D_METHOD("get_window_size"), &_OS::get_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("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);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index c40abd51f6..1790c68757 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -162,6 +162,7 @@ public:
virtual void set_window_position(const Point2 &p_position);
virtual Size2 get_window_size() const;
virtual Size2 get_real_window_size() const;
+ virtual Rect2 get_window_safe_area() const;
virtual void set_window_size(const Size2 &p_size);
virtual void set_window_fullscreen(bool p_enabled);
virtual bool is_window_fullscreen() const;