gui

package module
v0.0.0-...-f1d80ed Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Quit_game = errors.New("regular termination")
)

Functions

func DrawDebug

func DrawDebug(screen *ebiten.Image)

func DrawFPS

func DrawFPS(screen *ebiten.Image)

func DrawTPS

func DrawTPS(screen *ebiten.Image)

Types

type Button

type Button struct {
	Size Point

	Execute bool
	// contains filtered or unexported fields
}

func NewButton

func NewButton(size, position Point, text string) Button

func (*Button) Draw

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

func (*Button) Input

func (b *Button) Input()

func (*Button) SetBorderSize

func (b *Button) SetBorderSize(size float64)

func (*Button) SetColor

func (b *Button) SetColor(colorButton color.RGBA)

func (*Button) SetColorHover

func (b *Button) SetColorHover(colorButtonHover color.RGBA)

func (*Button) SetColorText

func (b *Button) SetColorText(colorText color.RGBA)

func (*Button) SetColorTextHover

func (b *Button) SetColorTextHover(colorTextHover color.RGBA)

func (*Button) SetFont

func (b *Button) SetFont(path string)

func (*Button) SetFontSize

func (b *Button) SetFontSize(size float64)

func (*Button) SetPosition

func (b *Button) SetPosition(position Point)

func (*Button) SetRadius

func (b *Button) SetRadius(radius int)

func (*Button) SetText

func (b *Button) SetText(text string)

type CheckBox

type CheckBox struct {
	Size Point

	Checked bool
	Execute bool
	// contains filtered or unexported fields
}

func NewCheckBox

func NewCheckBox(size, position Point) CheckBox

func (*CheckBox) Draw

func (c *CheckBox) Draw(screen *ebiten.Image)

func (*CheckBox) Input

func (c *CheckBox) Input()

func (*CheckBox) SetBorderSize

func (c *CheckBox) SetBorderSize(border float64)

func (*CheckBox) SetColor

func (c *CheckBox) SetColor(color color.RGBA)

func (*CheckBox) SetColorChecked

func (c *CheckBox) SetColorChecked(color color.RGBA)

func (*CheckBox) SetRadius

func (c *CheckBox) SetRadius(radius int)

type Contour

type Contour struct {
	Position Point
	Size     Point
	Text     string
}

func (*Contour) Draw

func (c *Contour) Draw(screen *ebiten.Image)

func (*Contour) Input

func (c *Contour) Input(g *SceneManager)

type Label

type Label struct {
	Position Point
	// contains filtered or unexported fields
}

func NewLabel

func NewLabel(text string, position Point) Label

func (*Label) Draw

func (l *Label) Draw(screen *ebiten.Image)

func (*Label) Input

func (l *Label) Input(g *SceneManager)

func (*Label) SetColor

func (l *Label) SetColor(colorButton color.RGBA)

func (*Label) SetFont

func (l *Label) SetFont(path string)

func (*Label) SetFontSize

func (l *Label) SetFontSize(size float64)

func (*Label) SetFunction

func (l *Label) SetFunction(execute func(g *SceneManager))

func (*Label) SetText

func (l *Label) SetText(text string)

type Point

type Point struct {
	X float64
	Y float64
}

type Scene

type Scene interface {
	Draw(screen *ebiten.Image)
	Layout(outsideWidth, outsideHeight int) (int, int)
	Update(g *SceneManager) error
}

type SceneManager

type SceneManager struct {
	Current_scene Scene
}

func (*SceneManager) Draw

func (g *SceneManager) Draw(screen *ebiten.Image)

func (*SceneManager) Layout

func (g *SceneManager) Layout(outsideWidth, outsideHeight int) (int, int)

func (*SceneManager) Update

func (g *SceneManager) Update() error

type Slider

type Slider struct {
	// contains filtered or unexported fields
}

func NewSlider

func NewSlider(size, position Point) Slider

func (*Slider) Draw

func (s *Slider) Draw(screen *ebiten.Image)

func (*Slider) Input

func (s *Slider) Input()

func (*Slider) SetColor

func (s *Slider) SetColor(color color.RGBA)

func (*Slider) SetColorButton

func (s *Slider) SetColorButton(color color.RGBA)

type SpriteButton

type SpriteButton struct {
	Execute bool
	// contains filtered or unexported fields
}

func NewSpriteButton

func NewSpriteButton(position Point, pathImgDefault, pathImgHover, pathImgClicked string) SpriteButton

func (*SpriteButton) Draw

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

func (*SpriteButton) Input

func (b *SpriteButton) Input()

func (*SpriteButton) SetScale

func (b *SpriteButton) SetScale(scale float64)

type Widget

type Widget interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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