game

package
v0.0.0-...-ab4f61a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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
	Color         color.RGBA
	ColorPressed  color.RGBA
	ButtonText    string

	IsPressed bool
	IsClicked bool // Clicked: the button was pressed in the last frame and is no longer pressed
	// contains filtered or unexported fields
}

func NewButton

func NewButton(x, y, width, height int, buttonText string, fontFace font.Face, textXPadding int, textYPadding int, color color.RGBA, colorPressed color.RGBA) (*Button, error)

func (*Button) Draw

func (b *Button) Draw(screen *ebiten.Image)

func (*Button) Update

func (b *Button) Update() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL