Haiku: implemet get_widow_size() get/set_window_position()
This commit is contained in:
parent
d44dfc2440
commit
b59e95ce1c
2 changed files with 14 additions and 1 deletions
|
@ -185,7 +185,18 @@ void OS_Haiku::set_window_title(const String& p_title) {
|
|||
}
|
||||
|
||||
Size2 OS_Haiku::get_window_size() const {
|
||||
ERR_PRINT("get_window_size() NOT IMPLEMENTED");
|
||||
BSize size = window->Size();
|
||||
return Size2i(size.IntegerWidth(), size.IntegerHeight());
|
||||
}
|
||||
|
||||
Point2 OS_Haiku::get_window_position() const {
|
||||
BPoint point(0, 0);
|
||||
window->ConvertToScreen(&point);
|
||||
return Point2i(point.x, point.y);
|
||||
}
|
||||
|
||||
void OS_Haiku::set_window_position(const Point2& p_position) {
|
||||
window->MoveTo(p_position.x, p_position.y);
|
||||
}
|
||||
|
||||
void OS_Haiku::set_video_mode(const VideoMode& p_video_mode, int p_screen) {
|
||||
|
|
|
@ -71,6 +71,8 @@ public:
|
|||
|
||||
virtual void set_window_title(const String& p_title);
|
||||
virtual Size2 get_window_size() const;
|
||||
virtual Point2 get_window_position() const;
|
||||
virtual void set_window_position(const Point2& p_position);
|
||||
|
||||
virtual void set_video_mode(const VideoMode& p_video_mode, int p_screen=0);
|
||||
virtual VideoMode get_video_mode(int p_screen=0) const;
|
||||
|
|
Loading…
Reference in a new issue