(rect *sdl.FRect)
| 1137 | } |
| 1138 | |
| 1139 | func (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 | } |
| 1159 | func (dropdown *Dropdown) Destroy() {} |
| 1160 | |
| 1161 | type ButtonGroup struct { |
nothing calls this directly
no test coverage detected