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

API change to set_fullscreen(enabled,screen)

This commit is contained in:
hurikhan
2015-01-10 18:38:30 +08:00
parent cd90215cec
commit 0d2ec19082
5 changed files with 10 additions and 10 deletions

View File

@@ -176,8 +176,8 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const {
} }
void _OS::set_fullscreen(bool p_fullscreen) { void _OS::set_fullscreen(bool p_enabled,int p_screen) {
OS::get_singleton()->set_fullscreen(p_fullscreen); OS::get_singleton()->set_fullscreen(p_enabled, p_screen);
} }
bool _OS::is_fullscreen() const { bool _OS::is_fullscreen() const {
@@ -641,7 +641,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0)); ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0));
//MSC //MSC
ObjectTypeDB::bind_method(_MD("set_fullscreen","fullscreen"),&_OS::set_fullscreen); ObjectTypeDB::bind_method(_MD("set_fullscreen","enabled","screen"),&_OS::set_fullscreen,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("is_fullscreen"),&_OS::is_fullscreen); ObjectTypeDB::bind_method(_MD("is_fullscreen"),&_OS::is_fullscreen);
ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second); ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);

View File

@@ -109,7 +109,7 @@ public:
Array get_fullscreen_mode_list(int p_screen=0) const; Array get_fullscreen_mode_list(int p_screen=0) const;
//MSC //MSC
void set_fullscreen(bool p_fullscreen); void set_fullscreen(bool p_enabled, int p_screen=0);
bool is_fullscreen() const; bool is_fullscreen() const;
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track); Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);

View File

@@ -151,7 +151,7 @@ public:
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const=0;
//MSC //MSC
virtual void set_fullscreen(bool fullscreen)=0; virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0;
virtual bool is_fullscreen() const=0; virtual bool is_fullscreen() const=0;
virtual void set_iterations_per_second(int p_ips); virtual void set_iterations_per_second(int p_ips);

View File

@@ -521,11 +521,11 @@ void OS_X11::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) cons
} }
void OS_X11::set_fullscreen(bool p_fullscreen) { void OS_X11::set_fullscreen(bool p_enabled,int p_screen) {
long wm_action; long wm_action;
if(p_fullscreen) { if(p_enabled) {
current_videomode.fullscreen = True; current_videomode.fullscreen = True;
wm_action = 1; wm_action = 1;
} else { } else {

View File

@@ -166,8 +166,8 @@ protected:
virtual const char * get_video_driver_name(int p_driver) const; virtual const char * get_video_driver_name(int p_driver) const;
virtual VideoMode get_default_video_mode() const; virtual VideoMode get_default_video_mode() const;
virtual int get_audio_driver_count() const; virtual int get_audio_driver_count() const;
virtual const char * get_audio_driver_name(int p_driver) const; virtual const char * get_audio_driver_name(int p_driver) const;
virtual void initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver); virtual void initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver);
virtual void finalize(); virtual void finalize();
@@ -213,7 +213,7 @@ public:
virtual VideoMode get_video_mode(int p_screen=0) const; virtual VideoMode get_video_mode(int p_screen=0) const;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const; virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const;
virtual void set_fullscreen(bool p_fullscreen); virtual void set_fullscreen(bool p_enabled,int p_screen=0);
virtual bool is_fullscreen() const; virtual bool is_fullscreen() const;
virtual void move_window_to_foreground(); virtual void move_window_to_foreground();