Documentation
¶
Index ¶
- Constants
- Variables
- func NewDecideScreen(herderLegacy herderlegacy.HerderLegacy, config DecideScreenConfig) herderlegacy.Screen
- func NewListScreen(herderLegacy herderlegacy.HerderLegacy, config ListScreenConfig) herderlegacy.Screen
- func NewMessageScreen(herderLegacy herderlegacy.HerderLegacy, config MessageScreenConfig) herderlegacy.Screen
- type Button
- func (b *Button) Callback() func()
- func (b *Button) ColorPalette() ButtonColorPalette
- func (b *Button) Disabled() bool
- func (b *Button) Draw(screen *ebiten.Image)
- func (b *Button) Position() Position
- func (b *Button) SetCallback(callback func())
- func (b *Button) SetColorPalette(colorPalette ButtonColorPalette)
- func (b *Button) SetDisabled(disabled bool)
- func (b *Button) SetPosition(position Position)
- func (b *Button) SetText(text string)
- func (b *Button) Text() string
- func (b *Button) Update()
- type ButtonColorPalette
- type ButtonConfig
- type Component
- type Countdown
- func (c *Countdown) Abgelaufen() bool
- func (c *Countdown) AbgelaufenCallback() func()
- func (c *Countdown) Draw(screen *ebiten.Image)
- func (c *Countdown) Position() Position
- func (c *Countdown) SetAbgelaufenCallback(callback func())
- func (c *Countdown) SetPosition(position Position)
- func (c *Countdown) SetVerbleibendeZeit(zeit int)
- func (c *Countdown) Update()
- func (c *Countdown) VerbleibendeZeit() int
- type CountdownColorPalette
- type CountdownConfig
- type DecideScreenConfig
- type HorizontalerAnchor
- type ListScreenButtonWidget
- type ListScreenConfig
- type ListScreenSelectionWidget
- type ListScreenToggleWidget
- type ListScreenWidget
- type MessageScreenConfig
- type Position
- type Selection
- type SelectionConfig
- type Text
- func (t *Text) ColorPalette() TextColorPalatte
- func (t *Text) Draw(screen *ebiten.Image)
- func (t *Text) Position() Position
- func (t *Text) SetColorPalette(colorPalette TextColorPalatte)
- func (t *Text) SetPosition(position Position)
- func (t *Text) SetText(text string)
- func (t *Text) Text() string
- func (t *Text) Update()
- type TextColorPalatte
- type TextConfig
- type Title
- func (t *Title) ColorPalette() TitleColorPalette
- func (t *Title) Draw(screen *ebiten.Image)
- func (t *Title) Position() Position
- func (t *Title) SetColorPalette(colorPalette TitleColorPalette)
- func (t *Title) SetPosition(position Position)
- func (t *Title) SetText(text string)
- func (t *Title) Text() string
- func (t *Title) Update()
- type TitleColorPalette
- type TitleConfig
- type Toggle
- type ToggleConfig
- type VertikalerAnchor
Constants ¶
View Source
const ( Width = 1920.0 Height = 1080.0 )
Variables ¶
View Source
var BackgroundColor = color.RGBA{R: 255, G: 255, B: 255, A: 255}
View Source
var ( CancelButtonColorPalette = ButtonColorPalette{ BackgroundColor: colornames.Red, BackgroundColorHovered: colornames.Darkred, TextColor: colornames.Whitesmoke, TextColorHovered: colornames.White, } )
Functions ¶
func NewDecideScreen ¶
func NewDecideScreen(herderLegacy herderlegacy.HerderLegacy, config DecideScreenConfig) herderlegacy.Screen
func NewListScreen ¶
func NewListScreen(herderLegacy herderlegacy.HerderLegacy, config ListScreenConfig) herderlegacy.Screen
func NewMessageScreen ¶
func NewMessageScreen(herderLegacy herderlegacy.HerderLegacy, config MessageScreenConfig) herderlegacy.Screen
Types ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
func NewButton ¶
func NewButton(config ButtonConfig) *Button
func (*Button) ColorPalette ¶
func (b *Button) ColorPalette() ButtonColorPalette
func (*Button) SetCallback ¶
func (b *Button) SetCallback(callback func())
func (*Button) SetColorPalette ¶
func (b *Button) SetColorPalette(colorPalette ButtonColorPalette)
func (*Button) SetDisabled ¶
func (*Button) SetPosition ¶
type ButtonColorPalette ¶
type ButtonConfig ¶
type Countdown ¶
type Countdown struct {
// contains filtered or unexported fields
}
func NewCountdown ¶
func NewCountdown(config CountdownConfig) *Countdown
func (*Countdown) Abgelaufen ¶
func (*Countdown) AbgelaufenCallback ¶
func (c *Countdown) AbgelaufenCallback() func()
func (*Countdown) SetAbgelaufenCallback ¶
func (c *Countdown) SetAbgelaufenCallback(callback func())
func (*Countdown) SetPosition ¶
func (*Countdown) SetVerbleibendeZeit ¶
func (*Countdown) VerbleibendeZeit ¶
type CountdownColorPalette ¶
type CountdownConfig ¶
type CountdownConfig struct { Position Position StartZeit int AbgelaufenCallback func() CustomColorPalette bool ColorPalette CountdownColorPalette }
type DecideScreenConfig ¶
type DecideScreenConfig struct { Title string Text string CancelText string CancelAction func() herderlegacy.Screen ConfirmText string ConfirmAction func() herderlegacy.Screen }
type HorizontalerAnchor ¶
type HorizontalerAnchor float64
const ( HorizontalerAnchorLinks HorizontalerAnchor = 0 HorizontalerAnchorMitte HorizontalerAnchor = 0.5 HorizontalerAnchorRechts HorizontalerAnchor = 1 )
type ListScreenButtonWidget ¶
type ListScreenButtonWidget struct { Text string Callback func() CustomColorPalette bool ColorPalette ButtonColorPalette }
type ListScreenConfig ¶
type ListScreenConfig struct { Title string Text string Widgets []ListScreenWidget CancelText string CancelAction func() herderlegacy.Screen }
type ListScreenToggleWidget ¶
type ListScreenWidget ¶
type ListScreenWidget interface {
// contains filtered or unexported methods
}
type MessageScreenConfig ¶
type MessageScreenConfig struct { Title string Text string ContinueText string ContinueAction func() herderlegacy.Screen }
type Position ¶
type Position struct {
X, Y float64
AnchorHorizontal HorizontalerAnchor
AnchorVertikal VertikalerAnchor
}
func NewCenteredPosition ¶
type Selection ¶
type Selection[T any] struct { // contains filtered or unexported fields }
func NewSelection ¶
func NewSelection[T any](herderLegacy herderlegacy.HerderLegacy, config SelectionConfig[T]) *Selection[T]
func (*Selection[T]) SetPosition ¶
type SelectionConfig ¶
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func NewText ¶
func NewText(config TextConfig) *Text
func (*Text) ColorPalette ¶
func (t *Text) ColorPalette() TextColorPalatte
func (*Text) SetColorPalette ¶
func (t *Text) SetColorPalette(colorPalette TextColorPalatte)
func (*Text) SetPosition ¶
type TextConfig ¶
type TextConfig struct { Position Position Text string CustomColorPalette bool ColorPalette TextColorPalatte }
type Title ¶
type Title struct {
// contains filtered or unexported fields
}
func NewTitle ¶
func NewTitle(config TitleConfig) *Title
func (*Title) ColorPalette ¶
func (t *Title) ColorPalette() TitleColorPalette
func (*Title) SetColorPalette ¶
func (t *Title) SetColorPalette(colorPalette TitleColorPalette)
func (*Title) SetPosition ¶
type TitleConfig ¶
type TitleConfig struct { Position Position Text string CustomColorPalette bool ColorPalette TitleColorPalette }
type Toggle ¶
type Toggle struct {
// contains filtered or unexported fields
}
func NewToggle ¶
func NewToggle(config ToggleConfig) *Toggle
func (*Toggle) SetEnabled ¶
func (*Toggle) SetPosition ¶
type ToggleConfig ¶
type VertikalerAnchor ¶
type VertikalerAnchor float64
const ( VertikalerAnchorOben VertikalerAnchor = 0 VertikalerAnchorMitte VertikalerAnchor = 0.5 VertikalerAnchorUnten VertikalerAnchor = 1 )
Click to show internal directories.
Click to hide internal directories.