(delta int)
| 201 | } |
| 202 | |
| 203 | func (m *BackgroundMenu) Move(delta int) { |
| 204 | m.Cursor += delta |
| 205 | if m.Cursor < 0 { |
| 206 | m.Cursor = m.count() - 1 |
| 207 | } |
| 208 | if m.Cursor >= m.count() { |
| 209 | m.Cursor = 0 |
| 210 | } |
| 211 | m.syncColor() |
| 212 | } |
| 213 | |
| 214 | // syncColor live-previews the fill as the cursor lands on a color/custom row; |
| 215 | // on the cork row the fill is left unchanged. |