ui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitScoreboard

func InitScoreboard(date time.Time) tea.Model

func StartStanding added in v0.1.1

func StartStanding()

func StartTea

func StartTea(date time.Time)

StartTea the entry point for the UI. Initializes the model.

func UpdateTeaView

func UpdateTeaView(m tea.Model)

Types

type GameKM added in v0.1.1

type GameKM struct {
	Down     key.Binding
	Up       key.Binding
	Previous key.Binding
}

game help keymap

func (GameKM) FullHelp added in v0.1.1

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

func (GameKM) ShortHelp added in v0.1.1

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

type GameModel

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

func InitGameView

func InitGameView(activeGameID string, activeGame nba.BoxScoreSummary, previousModel Model) *GameModel

func (GameModel) Init

func (m GameModel) Init() tea.Cmd

func (GameModel) Update

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

func (GameModel) View

func (m GameModel) View() string

type Model

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

func (Model) Init

func (m Model) Init() tea.Cmd

Init run any intial IO on program start

func (Model) Update

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

Update handle IO and commands

func (Model) View

func (m Model) View() string

View return the text UI to be output to the terminal

type SelectMsg

type SelectMsg struct {
	ActiveScorebardID uint
}

type StandingKM added in v0.1.1

type StandingKM struct {
	Down     key.Binding
	Up       key.Binding
	Previous key.Binding
	NextTab  key.Binding
}

standing help keymap

func (StandingKM) FullHelp added in v0.1.1

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

func (StandingKM) ShortHelp added in v0.1.1

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

type StandingsModel added in v0.1.1

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

func InitStandingsView added in v0.1.1

func InitStandingsView() *StandingsModel

func (StandingsModel) Init added in v0.1.1

func (m StandingsModel) Init() tea.Cmd

func (StandingsModel) Update added in v0.1.1

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

func (StandingsModel) View added in v0.1.1

func (m StandingsModel) View() string

Directories

Path Synopsis
gameboard

Jump to

Keyboard shortcuts

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