Documentation ¶
Index ¶
- type DefaultTable
- func (g *DefaultTable) SetColorCell(row int, col int, text string, color tcell.Color) *DefaultTable
- func (g *DefaultTable) SetCustomCell(row, col int, text string, color tcell.Color, align int) *DefaultTable
- func (g *DefaultTable) SetCustomIntCell(row, col, text int, color tcell.Color, align int) *DefaultTable
- func (g *DefaultTable) SetHeader(headerText ...string) *DefaultTable
- func (g *DefaultTable) SetHeaderCell(row int, col int, text string) *DefaultTable
- func (g *DefaultTable) SetIntCell(row int, col int, text int) *DefaultTable
- func (g *DefaultTable) SetTextCell(row int, col int, text string) *DefaultTable
- type GameInfo
- type GameList
- type Layout
- type PlayerStats
- type ScoreSummary
- type Scoreboard
- type StatPages
- type StatType
- type TeamStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTable ¶ added in v0.0.2
DefaultTable is the default tview.Table configuration for the application.
Inherits from tview.Table
func NewDefaultTable ¶ added in v0.0.3
func NewDefaultTable(title string) *DefaultTable
NewDefaultTable creates a new Table element and applies basic styling.
func (*DefaultTable) SetColorCell ¶ added in v0.0.2
func (g *DefaultTable) SetColorCell(row int, col int, text string, color tcell.Color) *DefaultTable
SetColorCell creates a cell that contains text of a specific color within a table.
func (*DefaultTable) SetCustomCell ¶ added in v0.0.2
func (g *DefaultTable) SetCustomCell(row, col int, text string, color tcell.Color, align int) *DefaultTable
SetCustomCell creates a customizable cell that contains text within a table.
func (*DefaultTable) SetCustomIntCell ¶ added in v0.0.2
func (g *DefaultTable) SetCustomIntCell(row, col, text int, color tcell.Color, align int) *DefaultTable
SetCustomIntCell creates a customizable cell that receives ints as its text value.
func (*DefaultTable) SetHeader ¶ added in v0.0.3
func (g *DefaultTable) SetHeader(headerText ...string) *DefaultTable
func (*DefaultTable) SetHeaderCell ¶ added in v0.0.2
func (g *DefaultTable) SetHeaderCell(row int, col int, text string) *DefaultTable
SetHeaderCell creates a cell that has a darker color than a standard table cell. Is used to keep table headers/categories uniform.
func (*DefaultTable) SetIntCell ¶ added in v0.0.2
func (g *DefaultTable) SetIntCell(row int, col int, text int) *DefaultTable
SetIntCell converts integers into text that can be placed within a cell within a table.
func (*DefaultTable) SetTextCell ¶ added in v0.0.2
func (g *DefaultTable) SetTextCell(row int, col int, text string) *DefaultTable
SetTextCell creates a basic cell that contains text within a table.
Is the same as tview.Table.SetCellSimple() but returns *GenericTable instead of *tview.Table.
type GameInfo ¶
type GameInfo struct {
*DefaultTable
}
GameInfo represents a UI element that displays relevant information of an NFL game.
Inherits from DefaultTable
type GameList ¶
GameList represents a UI element that displays a selectable list of upcoming/ongoing/recently ended NFL games. Inherits from tview.List
type Layout ¶
type Layout struct { Outer *tview.Grid Inner *tview.Grid GameList *GameList Scoreboard *Scoreboard GameInfo *GameInfo ScoreSummary *ScoreSummary TeamStats *TeamStats StatPages *StatPages KeyBinds *tview.TextView }
Layout represents the overall layout of the app. Contains all UI elements to be displayed within the window
type PlayerStats ¶
type PlayerStats struct { *DefaultTable StatType StatType SetStats func(game *api.Game) }
PlayerStats represents a UI element that displays the player stats from a specific NFL game. Can display passing/rushing/receiving stats.
Inherits from DefaultTable
func NewPlayerStats ¶
func NewPlayerStats(title string, statType StatType) *PlayerStats
NewPlayerStats creates a new PlayerStats UI element
type ScoreSummary ¶
type ScoreSummary struct {
*DefaultTable
}
ScoreSummary represents a UI element that displays a brief description of all scoring plays in a game.
Inherits from DefaultTable
func NewScoreSummary ¶
func NewScoreSummary() *ScoreSummary
NewScoreSummary creates a new ScoreSummary element
func (*ScoreSummary) SetScoreSummary ¶
func (s *ScoreSummary) SetScoreSummary(game *api.Game)
SetScoreSummary populates a ScoreSummary element with details of scoring plays.
type Scoreboard ¶
type Scoreboard struct {
*DefaultTable
}
Scoreboard represents a UI element that shows the scores of an NFL game quarter by quarter
Inherits from DefaultTable
func NewScoreboard ¶
func NewScoreboard() *Scoreboard
NewScoreboard creates a new Scoreboard element
func (*Scoreboard) SetScores ¶
func (s *Scoreboard) SetScores(game *api.Game)
SetScores populates the scoreboard with the current scores of a game.
type StatPages ¶
type StatPages struct { *tview.Pages ActivePage *statPage // contains filtered or unexported fields }
StatPages is a container that holds all statPage elements
func NewStatPages ¶
func NewStatPages() *StatPages
NewStatPages creates statPage elements for all stat types
func (*StatPages) NextPage ¶ added in v0.0.3
func (s *StatPages) NextPage()
NextPage switches to the next stat page depending on the current active stat page
type TeamStats ¶
type TeamStats struct {
*DefaultTable
}
TeamStats represents a UI element that displays basic team stats for an NFL game.
Inherits from DefaultTable