ui

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitModel

func InitModel(date time.Time) tea.Model

func StartTea

func StartTea(date time.Time)

Types

type GameScreenKM added in v0.0.3

type GameScreenKM struct {
	Up        key.Binding
	Down      key.Binding
	UpTable   key.Binding
	DownTable key.Binding
	Back      key.Binding
	Quit      key.Binding
	Enter     key.Binding
	Left      key.Binding
	Right     key.Binding
}

func (GameScreenKM) FullHelp added in v0.0.3

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

func (GameScreenKM) ShortHelp added in v0.0.3

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

type GameScreenModel

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

func InitGameScreenModel

func InitGameScreenModel(game mlb.Game, 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 added in v0.0.3

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

func (GamesListKM) FullHelp added in v0.0.3

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

func (GamesListKM) ShortHelp added in v0.0.3

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

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

Jump to

Keyboard shortcuts

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