Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
This commit is contained in:
commit
7f49e2a7a0
12 changed files with 47 additions and 26 deletions
|
|
@ -978,9 +978,9 @@ void _OS::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_screen_count"), &_OS::get_screen_count);
|
||||
ClassDB::bind_method(D_METHOD("get_current_screen"), &_OS::get_current_screen);
|
||||
ClassDB::bind_method(D_METHOD("set_current_screen", "screen"), &_OS::set_current_screen);
|
||||
ClassDB::bind_method(D_METHOD("get_screen_position", "screen"), &_OS::get_screen_position, DEFVAL(0));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_size", "screen"), &_OS::get_screen_size, DEFVAL(0));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_dpi", "screen"), &_OS::get_screen_dpi, DEFVAL(0));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_position", "screen"), &_OS::get_screen_position, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_size", "screen"), &_OS::get_screen_size, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_dpi", "screen"), &_OS::get_screen_dpi, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_window_position"), &_OS::get_window_position);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ public:
|
|||
virtual int get_screen_count() const;
|
||||
virtual int get_current_screen() const;
|
||||
virtual void set_current_screen(int p_screen);
|
||||
virtual Point2 get_screen_position(int p_screen = 0) const;
|
||||
virtual Size2 get_screen_size(int p_screen = 0) const;
|
||||
virtual int get_screen_dpi(int p_screen = 0) const;
|
||||
virtual Point2 get_screen_position(int p_screen = -1) const;
|
||||
virtual Size2 get_screen_size(int p_screen = -1) const;
|
||||
virtual int get_screen_dpi(int p_screen = -1) const;
|
||||
virtual Point2 get_window_position() const;
|
||||
virtual void set_window_position(const Point2 &p_position);
|
||||
virtual Size2 get_window_size() const;
|
||||
|
|
|
|||
|
|
@ -164,9 +164,9 @@ public:
|
|||
virtual int get_screen_count() const { return 1; }
|
||||
virtual int get_current_screen() const { return 0; }
|
||||
virtual void set_current_screen(int p_screen) {}
|
||||
virtual Point2 get_screen_position(int p_screen = 0) const { return Point2(); }
|
||||
virtual Size2 get_screen_size(int p_screen = 0) const { return get_window_size(); }
|
||||
virtual int get_screen_dpi(int p_screen = 0) const { return 72; }
|
||||
virtual Point2 get_screen_position(int p_screen = -1) const { return Point2(); }
|
||||
virtual Size2 get_screen_size(int p_screen = -1) const { return get_window_size(); }
|
||||
virtual int get_screen_dpi(int p_screen = -1) const { return 72; }
|
||||
virtual Point2 get_window_position() const { return Vector2(); }
|
||||
virtual void set_window_position(const Point2 &p_position) {}
|
||||
virtual Size2 get_window_size() const = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue