summaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
authorhurikhan <m4r10.5ch14ck@gmail.com>2015-01-17 00:18:45 +0900
committerhurikhan <m4r10.5ch14ck@gmail.com>2015-01-17 00:18:45 +0900
commit716971655eb9ab7909447e2f5d4911b6f45164bb (patch)
treef701605c5d7160978d947414cfe1f8a967770408 /core/bind
parentf1b9953d0b321a5564109e11b5326efa4624c70c (diff)
added the following methods:
* set_minimized(bool) * bool is_minimized() * set_maximized(bool) * bool is_maximized()
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp22
-rw-r--r--core/bind/core_bind.h12
2 files changed, 29 insertions, 5 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 1fb6f96e71..6919c70a5f 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -228,6 +228,22 @@ void _OS::set_resizable(bool p_enabled) {
bool _OS::is_resizable() const {
return OS::get_singleton()->is_resizable();
}
+
+void _OS::set_minimized(bool p_enabled) {
+ OS::get_singleton()->set_minimized(p_enabled);
+}
+
+bool _OS::is_minimized() const {
+ return OS::get_singleton()->is_minimized();
+}
+
+void _OS::set_maximized(bool p_enabled) {
+ OS::get_singleton()->set_maximized(p_enabled);
+}
+
+bool _OS::is_maximized() const {
+ return OS::get_singleton()->is_maximized();
+}
#endif
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
@@ -698,7 +714,11 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_fullscreen","enabled"),&_OS::set_fullscreen);
ObjectTypeDB::bind_method(_MD("is_fullscreen"),&_OS::is_fullscreen);
ObjectTypeDB::bind_method(_MD("set_resizable","enabled"),&_OS::set_resizable);
- ObjectTypeDB::bind_method(_MD("is_resizable"),&_OS::is_resizable);
+ ObjectTypeDB::bind_method(_MD("is_resizable"),&_OS::is_resizable);
+ ObjectTypeDB::bind_method(_MD("set_minimized", "enabled"),&_OS::set_minimized);
+ ObjectTypeDB::bind_method(_MD("is_minimized"),&_OS::is_minimized);
+ ObjectTypeDB::bind_method(_MD("set_maximized", "enabled"),&_OS::set_maximized);
+ ObjectTypeDB::bind_method(_MD("is_maximized"),&_OS::is_maximized);
#endif
ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 7ffd7e9e7c..b6f4f8eef4 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -118,10 +118,14 @@ public:
virtual void set_window_position(const Point2& p_position);
virtual Size2 get_window_size() const;
virtual void set_window_size(const Size2& p_size);
- void set_fullscreen(bool p_enabled);
- bool is_fullscreen() const;
- void set_resizable(bool p_enabled);
- bool is_resizable() const;
+ virtual void set_fullscreen(bool p_enabled);
+ virtual bool is_fullscreen() const;
+ virtual void set_resizable(bool p_enabled);
+ virtual bool is_resizable() const;
+ virtual void set_minimized(bool p_enabled);
+ virtual bool is_minimized() const;
+ virtual void set_maximized(bool p_enabled);
+ virtual bool is_maximized() const;
#endif
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);