Documentation
¶
Index ¶
- type Button
- func (b *Button) Draw(screen *ebiten.Image)
- func (b *Button) GetText() string
- func (b *Button) IsMouseOver() bool
- func (b *Button) SetBgColour(colour *color.NRGBA)
- func (b *Button) SetText(text string)
- func (b *Button) SetTextColour(colour *color.NRGBA)
- func (b *Button) SetX(x int)
- func (b *Button) SetY(y int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct { Width int Height int BgColour *color.NRGBA X int Y int Image *ebiten.Image // contains filtered or unexported fields }
Button represents a button.
func NewButton ¶
func NewButton(width int, height int, text string, textOffsetX int, textOffsetY int, textColour *color.NRGBA, font font.Face, bgColour *color.NRGBA, x int, y int) Button
NewButton is a contructor that creates a new button.
func (*Button) Draw ¶
func (b *Button) Draw(screen *ebiten.Image)
Draw is used to draw a button to the screen.
func (*Button) IsMouseOver ¶
IsMouseOver returns true if the mouse cursor is over the button image.
func (*Button) SetBgColour ¶
SetBgColour is used to change the background colour of a button.
func (*Button) SetTextColour ¶
SetTextColour is used to change the colour of text on a button.
Click to show internal directories.
Click to hide internal directories.