ebihelpers

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZOOM_STEP = 2
)

Variables

This section is empty.

Functions

func LoadFontFace

func LoadFontFace(path string, dpi, fontSize float64) (font.Face, error)

func ReadUserInput

func ReadUserInput() string

Types

type GameBox

type GameBox struct {
}

type GoodScreen

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

func FromScreen

func FromScreen(img *ebiten.Image) GoodScreen

func (GoodScreen) Bounds

func (s GoodScreen) Bounds() image.Rectangle

func (GoodScreen) DrawImage

func (s GoodScreen) DrawImage(image *ebiten.Image)

func (GoodScreen) DrawOutline

func (s GoodScreen) DrawOutline(rect image.Rectangle, clr color.Color)

func (GoodScreen) Fill

func (s GoodScreen) Fill(clr color.Color)

func (GoodScreen) FillRect

func (s GoodScreen) FillRect(rect image.Rectangle, clr color.Color)

func (GoodScreen) SubScreen

func (s GoodScreen) SubScreen(rect image.Rectangle) Screen

type Screen

type Screen interface {
	Bounds() image.Rectangle

	SubScreen(rect image.Rectangle) Screen
	Fill(clr color.Color)
	FillRect(rect image.Rectangle, clr color.Color)
	DrawImage(image *ebiten.Image)
	DrawOutline(rect image.Rectangle, clr color.Color)
}

type TextGridGame

type TextGridGame struct {
	Size            geom.Point2
	FontFace        font.Face
	FontSize        int
	Text            *iritext.TextGrid
	TextOrientation TextOrientation
	// contains filtered or unexported fields
}

func NewTextGridGame

func NewTextGridGame(width, height int, fontPath string, fontSize int, allowInput bool) TextGridGame

func (*TextGridGame) Draw

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

func (*TextGridGame) Layout

func (g *TextGridGame) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*TextGridGame) Update

func (g *TextGridGame) Update() error

type TextOrientation

type TextOrientation uint8
const (
	OriginTop     TextOrientation = 0
	OriginBottom  TextOrientation = 1
	RunFromOrigin TextOrientation = 0
	StayAtOrigin  TextOrientation = 2
)

Jump to

Keyboard shortcuts

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