game

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Err error
	// contains filtered or unexported fields
}

func New

func New(name string) *Base

func (*Base) AddKeyGroup

func (b *Base) AddKeyGroup(group KeyGroup)

func (*Base) ClearGroups

func (b *Base) ClearGroups()

func (*Base) DisabledNextKey added in v0.2.1

func (b *Base) DisabledNextKey()

func (*Base) DisabledPrevKey added in v0.2.1

func (b *Base) DisabledPrevKey()

func (*Base) DisabledSetKey added in v0.2.1

func (b *Base) DisabledSetKey()

func (*Base) FilterValue

func (b *Base) FilterValue() string

func (*Base) Init

func (b *Base) Init() tea.Cmd

func (*Base) Name

func (b *Base) Name() string

func (*Base) RegisterHelp

func (b *Base) RegisterHelp(action ViewFunc)

func (*Base) RegisterLevels

func (b *Base) RegisterLevels(total int, action SetLevelAction)

func (*Base) RegisterView

func (b *Base) RegisterView(action ViewFunc)

func (*Base) SetError

func (b *Base) SetError(err error)

func (*Base) SetFailure

func (b *Base) SetFailure(msg string)

func (*Base) SetParent

func (b *Base) SetParent(parent tea.Model)

func (*Base) SetStars

func (b *Base) SetStars(total, erned int)

func (*Base) SetSuccess

func (b *Base) SetSuccess(msg string)

func (*Base) Update

func (b *Base) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Base) View

func (b *Base) View() string

type Game

type Game interface {
	Name() string
	SetParent(tea.Model)
	tea.Model
	list.Item
}

type KeyGroup

type KeyGroup []*key.Binding

func (KeyGroup) FullHelp

func (g KeyGroup) FullHelp() [][]key.Binding

func (KeyGroup) ShortHelp

func (g KeyGroup) ShortHelp() []key.Binding

type KeyMap

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

type SetLevelAction

type SetLevelAction func(int)

type ViewFunc

type ViewFunc func() string

Jump to

Keyboard shortcuts

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