common

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeMenu = Mode(iota)
	ModeMarathon
	ModeSprint
	ModeUltra
	ModeLeaderboard
)

Variables

This section is empty.

Functions

func OverlayGameOverMessage

func OverlayGameOverMessage(bg string) string

func OverlayPausedMessage

func OverlayPausedMessage(bg string) string

func SwitchModeCmd

func SwitchModeCmd(target Mode, in SwitchModeInput) tea.Cmd

func WithNewEntry

func WithNewEntry(entry *data.Score) func(input *LeaderboardInput)

Types

type LeaderboardInput

type LeaderboardInput struct {
	GameMode string
	NewEntry *data.Score
}

func NewLeaderboardInput

func NewLeaderboardInput(gameMode string, opts ...func(input *LeaderboardInput)) *LeaderboardInput

type MarathonInput

type MarathonInput struct {
	Level      int
	PlayerName string
}

func NewMarathonInput

func NewMarathonInput(level int, playerName string) *MarathonInput
type MenuInput struct {
}

func NewMenuInput

func NewMenuInput() *MenuInput

type Mode

type Mode int

func (Mode) String

func (m Mode) String() string

type SingleInput

type SingleInput struct {
	Mode       Mode
	Level      int
	PlayerName string
}

func NewSingleInput

func NewSingleInput(mode Mode, level int, playerName string) *SingleInput

type SwitchModeInput

type SwitchModeInput interface {
	// contains filtered or unexported methods
}

type SwitchModeMsg

type SwitchModeMsg struct {
	Target Mode
	Input  SwitchModeInput
}

type WhitespaceOption

type WhitespaceOption func(*whitespace)

WhitespaceOption sets a styling rule for rendering whitespace.

Directories

Path Synopsis
components

Jump to

Keyboard shortcuts

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