context

package
v0.0.0-...-4595b12 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Black = color.Gray16{0}
	White = color.Gray16{0xffff}
	Gray  = color.Alpha16{0b1110111100100010}
)
View Source
var Dist int = 40

Functions

func ClearProject

func ClearProject()

func GetNextID

func GetNextID() int

func NewOverViewElement

func NewOverViewElement(name string, level int)

func NotifyOfSizeChange

func NotifyOfSizeChange(d elements.Element)

func RecursiveLevelChange

func RecursiveLevelChange(startlevel int, el elements.Element)

func RemoveElement

func RemoveElement(e []elements.Element, el elements.Element) []elements.Element

func SetPro

func SetPro(p Project)

func UpdateOverviewElements

func UpdateOverviewElements()

Types

type Canvas

type Canvas struct {
	XLeft       int
	XRight      int
	Dragged     elements.Element
	Dragables   []elements.Element
	Expandables []elements.Expandable
	Draw        []elements.Element
	Add         []elements.Addable
}

type ObjectSelect

type ObjectSelect struct {
	XLeft      int
	XRight     int
	Pressables []elements.Pressable
}

func (*ObjectSelect) AdjustButtonPositions

func (obj *ObjectSelect) AdjustButtonPositions()

type OverView

type OverView struct {
	XLeft      int
	XRight     int
	Pressables []OverViewElement
}

type OverViewElement

type OverViewElement struct {
	Name  string
	Level int
}

type Project

type Project struct {
	Name           string
	DragInProgress bool

	Win        Window
	Can        Canvas
	Over       OverView
	Obj        ObjectSelect
	Level1     []elements.Element
	SaveLoaded bool
	// contains filtered or unexported fields
}

func GetPro

func GetPro() *Project

func NewProject

func NewProject(Name string, Width int, Height int) *Project

func (*Project) SetNextID

func (pro *Project) SetNextID(i int)

type Window

type Window struct {
	XWidth  int
	YHeight int
}

Jump to

Keyboard shortcuts

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