Add Size() method to ui.Window that returns the window body size

master
Noah 2020-11-15 18:07:06 -08:00
Parent e2a561fbd0
révision 8433b1b216
1 fichiers modifiés avec 6 ajouts et 0 suppressions

Voir le fichier

@ -315,6 +315,12 @@ func (w *Window) SetMaximized(v bool) {
}
}
// Size returns the window's size (the size of its underlying body frame,
// including its title bar and content frames).
func (w *Window) Size() render.Rect {
return w.body.Size()
}
// Close the window, hiding it from display and calling its CloseWindow handler.
func (w *Window) Close() {
w.Hide()