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

Method SetRectangle

gui.go:1139–1158  ·  view source on GitHub ↗
(rect *sdl.FRect)

Source from the content-addressed store, hash-verified

1137}
1138
1139func (dropdown *Dropdown) SetRectangle(rect *sdl.FRect) {
1140 // r := *rect
1141 // dropdown.Rect = &r
1142
1143 newRect := *rect
1144
1145 newRect.X += 32
1146 newRect.W -= 64
1147
1148 if dropdown.Open {
1149 r := dropdown.Button.Rectangle()
1150 r.Y = newRect.Y
1151 r.X = newRect.X
1152 r.W = newRect.W
1153 dropdown.Button.SetRectangle(r)
1154 } else {
1155 dropdown.Button.SetRectangle(&newRect)
1156 }
1157
1158}
1159func (dropdown *Dropdown) Destroy() {}
1160
1161type ButtonGroup struct {

Callers

nothing calls this directly

Calls 2

RectangleMethod · 0.65
SetRectangleMethod · 0.65

Tested by

no test coverage detected