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

Struct BackgroundMenu

internal/app/menu.go:155–162  ·  view source on GitHub ↗

--- background picker ------------------------------------------------- BackgroundMenu is the stateful background picker. nil on model = closed. Two independent axes: a cork on/off toggle (row 0) and the fill color (the BackgroundColors rows, then a custom-hex row). Row layout: 0

Source from the content-addressed store, hash-verified

153// 1 .. len(colors) → color rows (color index = cursor-1)
154// len(colors)+1 → custom hex
155type BackgroundMenu struct {
156 Cursor int
157 Saved Background // background at open time; restored on esc
158
159 Cork bool // working cork toggle
160 Color string // working fill color (hex, or "" for transparent)
161 Hex string // custom-hex buffer, e.g. "#1c2233"
162}
163
164func NewBackgroundMenu(current Background) *BackgroundMenu {
165 m := &BackgroundMenu{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected