mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
get_screen_position() added
This commit is contained in:
parent
1445b6806b
commit
ce7c7a862e
7 changed files with 28 additions and 3 deletions
|
|
@ -181,6 +181,10 @@ int _OS::get_screen_count() const {
|
|||
return OS::get_singleton()->get_screen_count();
|
||||
}
|
||||
|
||||
Point2 _OS::get_screen_position(int p_screen) const {
|
||||
return OS::get_singleton()->get_screen_position(p_screen);
|
||||
}
|
||||
|
||||
Size2 _OS::get_screen_size(int p_screen) const {
|
||||
return OS::get_singleton()->get_screen_size(p_screen);
|
||||
}
|
||||
|
|
@ -668,6 +672,7 @@ void _OS::_bind_methods() {
|
|||
|
||||
#ifdef EXPERIMENTAL_WM_API
|
||||
ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
|
||||
ObjectTypeDB::bind_method(_MD("get_screen_position"),&_OS::get_screen_position,DEFVAL(0));
|
||||
ObjectTypeDB::bind_method(_MD("get_screen_size"),&_OS::get_screen_size,DEFVAL(0));
|
||||
ObjectTypeDB::bind_method(_MD("get_window_position"),&_OS::get_window_position);
|
||||
ObjectTypeDB::bind_method(_MD("set_window_position"),&_OS::set_window_position);
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ public:
|
|||
|
||||
#ifdef EXPERIMENTAL_WM_API
|
||||
virtual int get_screen_count() const;
|
||||
virtual Point2 get_screen_position(int p_screen=0) const;
|
||||
virtual Size2 get_screen_size(int p_screen=0) const;
|
||||
virtual Point2 get_window_position() const;
|
||||
virtual void set_window_position(const Point2& p_position);
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ public:
|
|||
|
||||
#ifdef EXPERIMENTAL_WM_API
|
||||
virtual int get_screen_count() const=0;
|
||||
virtual Point2 get_screen_position(int p_screen=0) const=0;
|
||||
virtual Size2 get_screen_size(int p_screen=0) const=0;
|
||||
virtual Point2 get_window_position() const=0;
|
||||
virtual void set_window_position(const Point2& p_position)=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue