ui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const REFRESH_GAME_RATE = 5
View Source
const REFRESH_LIST_RATE = 30
View Source
const RESPONSIVE_WIDTH_BREAKPOINT = 130

Variables

View Source
var TABLE_TO_INDEX_MAP = map[string]int{
	"awayBatters": 0,
	"homeBatters": 1,
}

Functions

func InitModel

func InitModel(date time.Time) tea.Model

func StartTea

func StartTea(date time.Time)

Types

type GameScreenKM

type GameScreenKM struct {
	Up       key.Binding
	Down     key.Binding
	Back     key.Binding
	Quit     key.Binding
	PageUp   key.Binding
	PageDown key.Binding
}

func (GameScreenKM) FullHelp

func (k GameScreenKM) FullHelp() [][]key.Binding

func (*GameScreenKM) SetEnabled

func (k *GameScreenKM) SetEnabled(enabled bool)

func (GameScreenKM) ShortHelp

func (k GameScreenKM) ShortHelp() []key.Binding

type GameScreenModel

type GameScreenModel struct {
	// contains filtered or unexported fields
}

func InitGameScreenModel

func InitGameScreenModel(game ncaa.GameNCAA, previousModel Model) *GameScreenModel

func (GameScreenModel) Init

func (m GameScreenModel) Init() tea.Cmd

func (GameScreenModel) Update

func (m GameScreenModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (GameScreenModel) View

func (m GameScreenModel) View() string

type GamesListKM

type GamesListKM struct {
	Up          key.Binding
	Down        key.Binding
	Previous    key.Binding
	Next        key.Binding
	Quit        key.Binding
	Enter       key.Binding
	FocusPicker key.Binding
	Jump        key.Binding
}

func (GamesListKM) FullHelp

func (k GamesListKM) FullHelp() [][]key.Binding

func (GamesListKM) ShortHelp

func (k GamesListKM) ShortHelp() []key.Binding

type Model

type Model struct {
	// contains filtered or unexported fields
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) UpdateWithDate

func (m Model) UpdateWithDate(date time.Time) Model

func (Model) View

func (m Model) View() string

type TickMsg

type TickMsg time.Time

Directories

Path Synopsis
Credit to @dylantientcheu for this implementation originally from nbacli https://github.com/dylantientcheu/nbacli/blob/master/ui/gameboard/scoretext/scoretext.go
Credit to @dylantientcheu for this implementation originally from nbacli https://github.com/dylantientcheu/nbacli/blob/master/ui/gameboard/scoretext/scoretext.go
Credit to @TypicalAM https://github.com/TypicalAM/goread
Credit to @TypicalAM https://github.com/TypicalAM/goread

Jump to

Keyboard shortcuts

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