MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Center

Method Center

menu.go:717–724  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

715}
716
717func (menu *Menu) Center() {
718
719 x := float32(int32((globals.ScreenSize.X / 2) - (menu.Rect.W / 2)))
720 y := float32(int32((globals.ScreenSize.Y / 2) - (menu.Rect.H / 2)))
721
722 menu.Rect.X = x
723 menu.Rect.Y = y
724}
725
726func (menu *Menu) Rectangle() *sdl.FRect {
727 return menu.Rect

Callers 6

ConstructMenusFunction · 0.95
HandleDroppedFilesMethod · 0.45
OpenMethod · 0.45
showingMethod · 0.45
handleEventsFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected