diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 10 | ||||
-rw-r--r-- | core/bind/core_bind.h | 2 | ||||
-rw-r--r-- | core/os/os.h | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index d67b93603c..bf611f89c9 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -260,6 +260,13 @@ bool _OS::is_window_maximized() const { return OS::get_singleton()->is_window_maximized(); } +void _OS::set_borderless_window(bool p_borderless) { + OS::get_singleton()->set_borderless_window(p_borderless); +} + +bool _OS::get_borderless_window() const { + return OS::get_singleton()->get_borderless_window(); +} void _OS::set_use_file_access_save_and_swap(bool p_enable) { @@ -865,6 +872,9 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized); ObjectTypeDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized); + ObjectTypeDB::bind_method(_MD("set_borderless_window", "borderless"), &_OS::set_borderless_window); + ObjectTypeDB::bind_method(_MD("get_borderless_window"), &_OS::get_borderless_window); + ObjectTypeDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation); ObjectTypeDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 7b3494ebc1..ab11c4804c 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -128,6 +128,8 @@ public: virtual void set_window_maximized(bool p_enabled); virtual bool is_window_maximized() const; + virtual void set_borderless_window(bool p_borderless); + virtual bool get_borderless_window() const; Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track); bool native_video_is_playing(); diff --git a/core/os/os.h b/core/os/os.h index 65ce44465b..73726feb37 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -75,8 +75,9 @@ public: int width,height; bool fullscreen; bool resizable; + bool borderless_window; float get_aspect() const { return (float)width/(float)height; } - VideoMode(int p_width=1024,int p_height=600,bool p_fullscreen=false, bool p_resizable = true) {width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; } + VideoMode(int p_width=1024,int p_height=600,bool p_fullscreen=false, bool p_resizable = true,bool p_borderless_window=false) { width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; borderless_window=p_borderless_window; } }; protected: friend class Main; @@ -172,6 +173,8 @@ public: virtual void set_window_maximized(bool p_enabled) {} virtual bool is_window_maximized() const { return true; } + virtual void set_borderless_window(int p_borderless) {} + virtual bool get_borderless_window() { return 0; } |