Documentation
¶
Index ¶
- type Button
- type Digit
- type Digits
- type Drawable
- type List
- type TextButton
- type UI
- func (b *UI) GetPos() (int, int)
- func (b *UI) GetSize() (int, int)
- func (b *UI) IsActive() bool
- func (b *UI) IsDown() bool
- func (b *UI) IsHover() bool
- func (b *UI) IsJustPressed() bool
- func (b *UI) IsJustReleased() bool
- func (b *UI) IsMouseOnButton() bool
- func (b *UI) ResetOptions()
- func (b *UI) SetActive(x bool)
- func (b *UI) SetPos(x, y int)
- type UIDirection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct { *UI // contains filtered or unexported fields }
func NewButton ¶
NewButton create a new button with 4 images of 4 states, normal, hover and press, disable to be drawn at posX posY on screen
type Digits ¶
type Digits struct {
// contains filtered or unexported fields
}
type List ¶
Draw a list of UI
func NewList ¶
func NewList(x, y int, dir UIDirection) *List
func (*List) IsJustPressed ¶
return index of mouse just pressed UI, -1 if none
func (*List) IsJustReleased ¶
return index of mouse just released UI, -1 if none
type TextButton ¶
type TextButton struct { *UI // contains filtered or unexported fields }
Use text as a button
func NewTextButton ¶
func NewTextButton(txt string, c color.Color, face font.Face, posX, posY int, interactive bool) *TextButton
NewButton create a new button with 4 states, normal, hover and press, disable to be drawn at posX posY on screen
func (*TextButton) Draw ¶
func (b *TextButton) Draw(screen *ebiten.Image)
type UI ¶
Common UI variables and functions
func (*UI) IsJustPressed ¶
func (*UI) IsJustReleased ¶
func (*UI) IsMouseOnButton ¶
func (*UI) ResetOptions ¶
func (b *UI) ResetOptions()
Click to show internal directories.
Click to hide internal directories.