Documentation ¶
Overview ¶
Package ui provides some simple user interface objects
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
A Button is a grahical item that can be clicked
type ToggleButton ¶
type ToggleButton struct {
// contains filtered or unexported fields
}
A ToggleButton is a named button that is part of a toggle group
func NewToggleButton ¶
func NewToggleButton(name string, r *sdl.Rect, checkboxOffset *sdl.Rect, sheet *gfx2.Sheet, textureID int, checkboxID int) *ToggleButton
NewToggleButton creates a new toggle button
func (*ToggleButton) Render ¶
func (tb *ToggleButton) Render(r *sdl.Renderer)
Render draws the toggle button to the renderer
type ToggleGroup ¶
ToggleGroup is a group of buttons, only one of which may be selected
func NewToggleGroup ¶
func NewToggleGroup(defaultSelected string) *ToggleGroup
NewToggleGroup create a new toggle group, marking the the given one as the default selected
func (*ToggleGroup) Add ¶
func (tg *ToggleGroup) Add(tb *ToggleButton)
Add a new toggle button, must be done before Run is called
func (*ToggleGroup) Render ¶
func (tg *ToggleGroup) Render(r *sdl.Renderer)
Render the toggle group buttons
func (*ToggleGroup) Run ¶
func (tg *ToggleGroup) Run(ctx context.Context, m *gamekit.Mouse)
Run the backend event processes
Click to show internal directories.
Click to hide internal directories.