added a Size function to get the window size

This commit is contained in:
Thomas Friedel 2018-11-13 12:19:05 +01:00
parent 4327bd938a
commit afbdfdec44
2 changed files with 11 additions and 0 deletions

View file

@ -170,3 +170,8 @@ func (wnd *Window) MainLoop(run func()) {
wnd.FinishFrame()
}
}
// Size returns the current width and height of the window
func (wnd *Window) Size() (int, int) {
return wnd.Window.GetSize()
}

View file

@ -250,3 +250,9 @@ func (wnd *Window) MainLoop(run func()) {
wnd.FinishFrame()
}
}
// Size returns the current width and height of the window
func (wnd *Window) Size() (int, int) {
w, h := wnd.Window.GetSize()
return int(w), int(h)
}