ui

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MenuAccent      = lipgloss.AdaptiveColor{Light: "130", Dark: "173"}
	MenuAccentLight = lipgloss.AdaptiveColor{Light: "137", Dark: "180"}
	MenuText        = lipgloss.AdaptiveColor{Light: "235", Dark: "252"}
	MenuTextDim     = lipgloss.AdaptiveColor{Light: "243", Dark: "243"}
	MenuDim         = lipgloss.AdaptiveColor{Light: "250", Dark: "238"}
	MenuTableHeader = lipgloss.AdaptiveColor{Light: "130", Dark: "180"}

	RootStyle  = lipgloss.NewStyle().Margin(1, 2)
	DebugStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder(), true).
				BorderForeground(lipgloss.Color("124"))
)

Earth-tone palette for menus — ANSI 256 colors with light/dark adaptivity.

Functions

func FormatStatus

func FormatStatus(s store.GameStatus) string

FormatStatus converts a GameStatus enum to a human-readable display string.

func InitContinueTable

func InitContinueTable(s *store.Store, height int) (table.Model, []store.GameRecord)

InitContinueTable loads saved games from the store and builds the table widget. Returns the table, the loaded games, and the column definitions.

func InitList

func InitList(items []list.Item, title string) list.Model

InitList creates a styled list widget with the standard puzzletea theme.

Types

type MenuItem struct {
	ItemTitle string
	Desc      string
}

MenuItem is a simple list.Item implementation for menu entries.

func (i MenuItem) Description() string
func (i MenuItem) FilterValue() string
func (i MenuItem) Title() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL