MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / Move

Method Move

internal/app/menu.go:24–32  ·  view source on GitHub ↗
(delta int)

Source from the content-addressed store, hash-verified

22}
23
24func (m *FontMenu) Move(delta int) {
25 m.Cursor += delta
26 if m.Cursor < 0 {
27 m.Cursor = len(TextModes) - 1
28 }
29 if m.Cursor >= len(TextModes) {
30 m.Cursor = 0
31 }
32}
33
34func (m *FontMenu) Selected() TextStyleMode { return TextModes[m.Cursor] }
35

Callers 2

handleFontMenuKeyMethod · 0.45
handleBgMenuKeyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected