ui

package
v0.0.0-...-30efc20 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorBackground            = color.RGBA{255, 255, 255, 255}
	ColorBlockSystemOn         = color.RGBA{0, 0, 0, 255}
	ColorBlockSystemOnDiagonal = color.RGBA{200, 200, 200, 255}
	ColorBlockSystemOnUnique   = color.RGBA{200, 20, 20, 255}
	ColorBlockSystemOnSpace    = color.RGBA{234, 234, 234, 255}
	ColorGridLines             = color.RGBA{230, 230, 230, 255}
	ColorText                  = color.RGBA{0, 0, 0, 255}
)

Functions

func NewWindow

func NewWindow(title string, rect pixel.Rect) *pixelgl.Window

Types

type SSM

type SSM struct {
	Imd  *imdraw.IMDraw
	Text *Typography
	Rect pixel.Rect

	Pattern []string
	Grid    [][]uint32
	// contains filtered or unexported fields
}

func NewSSM

func NewSSM(rect pixel.Rect, pattern []string) *SSM

func (*SSM) Clear

func (ssm *SSM) Clear()

func (*SSM) Compose

func (ssm *SSM) Compose()

func (*SSM) DrawTextTo

func (ssm *SSM) DrawTextTo(win *pixelgl.Window)

func (*SSM) DrawTo

func (ssm *SSM) DrawTo(imd *imdraw.IMDraw)

func (*SSM) Update

func (ssm *SSM) Update(newPattern []string)

type Typography

type Typography struct {
	TxtBatch *pixel.Batch
	Txt      *text.Text
}

func NewTypography

func NewTypography(fontSize float64) *Typography

func (*Typography) DrawRuneToBatch

func (typ *Typography) DrawRuneToBatch(r rune, vec pixel.Vec, clr color.Color, txtBatch *pixel.Batch, txt *text.Text)

func (*Typography) DrawStringToBatch

func (typ *Typography) DrawStringToBatch(s string, vec pixel.Vec, clr color.Color, txtBatch *pixel.Batch, txt *text.Text)

Jump to

Keyboard shortcuts

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