Documentation ¶
Index ¶
- Constants
- func WithCompany(activeCompany *data.Company) compositor.Option[*Model]
- func WithPlayer(activePlayer *persona.Player) compositor.Option[*Model]
- type Indexes
- type Model
- func (model *Model) AddCompany() (cmd tea.Cmd)
- func (model *Model) Init() tea.Cmd
- func (model *Model) SetAndStartState(state compositor.State) (cmd tea.Cmd)
- func (model *Model) SetAndStartSubstate(substate compositor.SubstateInterface[*Model]) (cmd tea.Cmd)
- func (model *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (model *Model) UpdateCompany() (cmd tea.Cmd)
- func (model *Model) UpdateConfirmQuitWithoutSaving() (cmd tea.Cmd)
- func (model *Model) UpdateConfirmRemoval() (cmd tea.Cmd)
- func (model *Model) UpdateConfirmSave(nextState compositor.State) (cmd tea.Cmd)
- func (model *Model) UpdateFallThrough(msg tea.Msg) (cmd tea.Cmd)
- func (model *Model) UpdateOnKeyPress(msg tea.KeyMsg) (cmd tea.Cmd)
- func (model *Model) UpdateOnSubmodelEnded() (cmd tea.Cmd)
- func (model *Model) UpdateSelectMenuOption() (cmd tea.Cmd)
- func (model *Model) UpdateSelectPlayerCompany() (cmd tea.Cmd)
- func (model *Model) View() (view string)
- type Substate
- type SubstateCompany
- func (state SubstateCompany) Start(model *Model) (cmd tea.Cmd)
- func (state SubstateCompany) UpdateOnEnded(model *Model) (cmd tea.Cmd)
- func (state SubstateCompany) UpdateOnEnter(model *Model) (cmd tea.Cmd)
- func (state SubstateCompany) UpdateOnEsc(model *Model) (cmd tea.Cmd)
- func (state SubstateCompany) UpdateOnFallThrough(model *Model, msg tea.Msg) (cmd tea.Cmd)
- func (state SubstateCompany) View(model *Model) (view string)
- type SubstateEditing
- func (state SubstateEditing) Start(model *Model) (cmd tea.Cmd)
- func (state SubstateEditing) UpdateOnEnded(model *Model) (cmd tea.Cmd)
- func (state SubstateEditing) UpdateOnEnter(model *Model) (cmd tea.Cmd)
- func (state SubstateEditing) UpdateOnEsc(model *Model) (cmd tea.Cmd)
- func (state SubstateEditing) UpdateOnFallThrough(model *Model, msg tea.Msg) (cmd tea.Cmd)
- func (state SubstateEditing) View(model *Model) (view string)
- type SubstatePlayer
- func (state SubstatePlayer) Start(model *Model) (cmd tea.Cmd)
- func (state SubstatePlayer) UpdateOnEnded(model *Model) (cmd tea.Cmd)
- func (state SubstatePlayer) UpdateOnEnter(model *Model) (cmd tea.Cmd)
- func (state SubstatePlayer) UpdateOnEsc(model *Model) (cmd tea.Cmd)
- func (state SubstatePlayer) UpdateOnFallThrough(model *Model, msg tea.Msg) (cmd tea.Cmd)
- func (state SubstatePlayer) View(model *Model) (view string)
Constants ¶
View Source
const ( StateEditingMenu compositor.State = iota + 1000 StatePlayerMenu StateCompanyMenu StateRosterMenu )
Variables ¶
This section is empty.
Functions ¶
func WithCompany ¶
func WithCompany(activeCompany *data.Company) compositor.Option[*Model]
func WithPlayer ¶
func WithPlayer(activePlayer *persona.Player) compositor.Option[*Model]
Types ¶
type Model ¶
func (*Model) AddCompany ¶
func (*Model) SetAndStartState ¶
func (model *Model) SetAndStartState(state compositor.State) (cmd tea.Cmd)
func (*Model) SetAndStartSubstate ¶
func (model *Model) SetAndStartSubstate(substate compositor.SubstateInterface[*Model]) (cmd tea.Cmd)
func (*Model) UpdateCompany ¶
func (*Model) UpdateConfirmQuitWithoutSaving ¶
func (*Model) UpdateConfirmRemoval ¶
func (*Model) UpdateConfirmSave ¶
func (model *Model) UpdateConfirmSave(nextState compositor.State) (cmd tea.Cmd)
func (*Model) UpdateOnSubmodelEnded ¶
func (*Model) UpdateSelectMenuOption ¶
func (*Model) UpdateSelectPlayerCompany ¶
type Substate ¶
type Substate struct { Editing SubstateEditing Player SubstatePlayer Company SubstateCompany }
type SubstateCompany ¶
type SubstateCompany int
const ( CreatingCompany SubstateCompany = iota EditingCompany )
func (SubstateCompany) UpdateOnEnded ¶
func (state SubstateCompany) UpdateOnEnded(model *Model) (cmd tea.Cmd)
func (SubstateCompany) UpdateOnEnter ¶
func (state SubstateCompany) UpdateOnEnter(model *Model) (cmd tea.Cmd)
func (SubstateCompany) UpdateOnEsc ¶
func (state SubstateCompany) UpdateOnEsc(model *Model) (cmd tea.Cmd)
func (SubstateCompany) UpdateOnFallThrough ¶
func (SubstateCompany) View ¶
func (state SubstateCompany) View(model *Model) (view string)
type SubstateEditing ¶
type SubstateEditing int
const ( SelectingOption SubstateEditing = iota SelectingCompanyToEdit SelectingCompanyToRemove ConfirmRemoval ConfirmSave ConfirmQuitWithoutSaving )
func (SubstateEditing) UpdateOnEnded ¶
func (state SubstateEditing) UpdateOnEnded(model *Model) (cmd tea.Cmd)
func (SubstateEditing) UpdateOnEnter ¶
func (state SubstateEditing) UpdateOnEnter(model *Model) (cmd tea.Cmd)
func (SubstateEditing) UpdateOnEsc ¶
func (state SubstateEditing) UpdateOnEsc(model *Model) (cmd tea.Cmd)
func (SubstateEditing) UpdateOnFallThrough ¶
func (SubstateEditing) View ¶
func (state SubstateEditing) View(model *Model) (view string)
type SubstatePlayer ¶
type SubstatePlayer int
const (
SelectingPlayer SubstatePlayer = iota
)
func (SubstatePlayer) UpdateOnEnded ¶
func (state SubstatePlayer) UpdateOnEnded(model *Model) (cmd tea.Cmd)
func (SubstatePlayer) UpdateOnEnter ¶
func (state SubstatePlayer) UpdateOnEnter(model *Model) (cmd tea.Cmd)
func (SubstatePlayer) UpdateOnEsc ¶
func (state SubstatePlayer) UpdateOnEsc(model *Model) (cmd tea.Cmd)
func (SubstatePlayer) UpdateOnFallThrough ¶
func (SubstatePlayer) View ¶
func (state SubstatePlayer) View(model *Model) (view string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.