ui

package
v0.0.0-...-86a4e1d Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const MenuWidth = 360

Variables

This section is empty.

Functions

func CreateObject

func CreateObject(ty ImageType, res minifac.Resource) (minifac.Object, error)

Types

type ImageHandler

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

func NewImageHandler

func NewImageHandler(u *minifac.Universe) *ImageHandler

func (*ImageHandler) Images

func (h *ImageHandler) Images() []*PositionedImage

type ImageType

type ImageType string
const (
	ImageTypeProducer       ImageType = "producer.png"
	ImageTypeAssembler      ImageType = "assembler.png"
	ImageTypeTrash          ImageType = "trash.png"
	ImageTypeFinalizer      ImageType = "finalizer.png"
	ImageTypeConveyor_east  ImageType = "conveyor_east.png"
	ImageTypeConveyor_north ImageType = "conveyor_north.png"
	ImageTypeConveyor_south ImageType = "conveyor_south.png"
	ImageTypeConveyor_west  ImageType = "conveyor_west.png"
	ImageTypeWood           ImageType = "wood.png"
	ImageTypeCoal           ImageType = "coal.png"
	ImageTypeStone          ImageType = "stone.png"
	ImageTypeIronOre        ImageType = "ironore.png"
	ImageTypeIron           ImageType = "iron.png"
	ImageTypeSteel          ImageType = "steel.png"
	ImageTypeWall           ImageType = "wall.png"
)

type PositionedImage

type PositionedImage struct {
	Position grid.Position
	Image    *ebiten.Image
}

type UI

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

func New

func New(uni *minifac.Universe) *UI

func (*UI) Draw

func (ui *UI) Draw(screen *ebiten.Image)

func (*UI) Layout

func (ui *UI) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*UI) Update

func (ui *UI) Update() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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