added a Size function to get the window size
This commit is contained in:
parent
4327bd938a
commit
afbdfdec44
2 changed files with 11 additions and 0 deletions
|
@ -170,3 +170,8 @@ func (wnd *Window) MainLoop(run func()) {
|
||||||
wnd.FinishFrame()
|
wnd.FinishFrame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Size returns the current width and height of the window
|
||||||
|
func (wnd *Window) Size() (int, int) {
|
||||||
|
return wnd.Window.GetSize()
|
||||||
|
}
|
||||||
|
|
|
@ -250,3 +250,9 @@ func (wnd *Window) MainLoop(run func()) {
|
||||||
wnd.FinishFrame()
|
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)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue