widgets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultFont

func GetDefaultFont(size float64) font.Face

func GetFont

func GetFont(size float64, file []byte) font.Face

Types

type Box

type Box struct {
	PColor   color.Color
	SColor   color.Color
	Inverted func() bool
}

func (*Box) HandleDraw

func (b *Box) HandleDraw(screen *ebiten.Image, frame image.Rectangle)

type Label

type Label struct {
	Box
	Text     string
	TextFunc func() string
	Font     font.Face
}

func (*Label) HandleDraw

func (lb *Label) HandleDraw(screen *ebiten.Image, frame image.Rectangle)

type LabelButton

type LabelButton struct {
	Label
	Action func()
}

func (*LabelButton) HandleJustPressedMouseButtonLeft

func (b *LabelButton) HandleJustPressedMouseButtonLeft(x, y int) bool

func (*LabelButton) HandleJustReleasedMouseButtonLeft

func (b *LabelButton) HandleJustReleasedMouseButtonLeft(x, y int)

type Sprite

type Sprite struct {
	Image    image.Image
	Scale    float64
	Inverted func() bool
}

func (*Sprite) HandleDraw

func (b *Sprite) HandleDraw(screen *ebiten.Image, frame image.Rectangle)

type SpriteButton

type SpriteButton struct {
	Sprite
	Action func()
}

func (*SpriteButton) HandleJustPressedMouseButtonLeft

func (b *SpriteButton) HandleJustPressedMouseButtonLeft(x, y int) bool

func (*SpriteButton) HandleJustReleasedMouseButtonLeft

func (b *SpriteButton) HandleJustReleasedMouseButtonLeft(x, y int)

Jump to

Keyboard shortcuts

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