Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct {
X, Y int
Width, Height int
Label string
OnClick func()
Input InputHandler
// contains filtered or unexported fields
}
Button represents a simple UI button.
type DefaultInputHandler ¶
type DefaultInputHandler struct{}
DefaultInputHandler is the default implementation using Ebiten.
func (*DefaultInputHandler) CursorPosition ¶
func (d *DefaultInputHandler) CursorPosition() (int, int)
func (*DefaultInputHandler) IsMouseButtonPressed ¶
func (d *DefaultInputHandler) IsMouseButtonPressed(button ebiten.MouseButton) bool
type InputHandler ¶
type InputHandler interface { CursorPosition() (int, int) IsMouseButtonPressed(button ebiten.MouseButton) bool }
InputHandler abstracts input handling for testing.
Click to show internal directories.
Click to hide internal directories.