runner

package
v0.0.0-...-fe76f8b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const MESSAGE_TTL = 2

todo: PositionMessage-s should be vbo-s instead of using the cpu to recalc their positions

Variables

This section is empty.

Functions

func ToEpoch

func ToEpoch(mins, hours, day, month, year int) int

Types

type Calendar

type Calendar struct {
	Paused         bool
	MinsSinceEpoch int

	EventListener CalendarUpdate
	// contains filtered or unexported fields
}

func NewCalendar

func NewCalendar(mins, hours, day, month, year int, incSpeed float64) *Calendar

func (*Calendar) AsString

func (c *Calendar) AsString() string

func (*Calendar) AsTimeString

func (c *Calendar) AsTimeString() string

func (*Calendar) FromEpoch

func (c *Calendar) FromEpoch() (mins, hours, day, month, year int)

func (*Calendar) Incr

func (c *Calendar) Incr(delta float64)

type CalendarUpdate

type CalendarUpdate interface {
	MinsChange(mins, hours, day, month, year int)
}

type Message

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

type NamedPanel

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

type OverlayImage

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

type PanelControl

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

type PositionMessage

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

type Progress

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

type Runner

type Runner struct {
	Calendar *Calendar

	Overlay *gfx.Panel
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner() *Runner

func (*Runner) AddImage

func (runner *Runner) AddImage(x, y int, imageName string, w, h int) int

func (*Runner) AddMessage

func (runner *Runner) AddMessage(x, y int, message string, fontIndex int, r, g, b uint8) int

func (*Runner) AddProgress

func (runner *Runner) AddProgress(x, y, w, lineWidth int, value, maxValue float64, r, g, b uint8) int

func (*Runner) CanZoom

func (runner *Runner) CanZoom() bool

func (*Runner) CenterPanel

func (runner *Runner) CenterPanel(name string)

func (*Runner) CloseTopPanel

func (runner *Runner) CloseTopPanel() bool

func (*Runner) DelAllImages

func (runner *Runner) DelAllImages()

func (*Runner) DelAllMessages

func (runner *Runner) DelAllMessages()

func (*Runner) DelAllProgresses

func (runner *Runner) DelAllProgresses()

func (*Runner) DelImage

func (runner *Runner) DelImage(index int)

func (*Runner) DelMessage

func (runner *Runner) DelMessage(messageIndex int)

func (*Runner) DelProgress

func (runner *Runner) DelProgress(index int)

func (*Runner) DragFromUi

func (runner *Runner) DragFromUi(pixelX, pixelY int) (string, int)

func (*Runner) Eval

func (runner *Runner) Eval(command string) (interface{}, error)

func (*Runner) Events

func (runner *Runner) Events(delta float64, fadeDir int, mouseX, mouseY, mouseWorldX, mouseWorldY, mouseWorldZ, mouseButtonDown int32, mouseOnInteractive bool)

func (*Runner) Exit

func (runner *Runner) Exit()

func (*Runner) GetOverPanel

func (runner *Runner) GetOverPanel() (string, int, int, bool)

func (*Runner) GetZ

func (runner *Runner) GetZ() int

func (*Runner) Init

func (runner *Runner) Init(app *gfx.App, config map[string]interface{})

func (*Runner) IsOverPanel

func (runner *Runner) IsOverPanel(name string) (int, int, bool)

func (*Runner) Loading

func (runner *Runner) Loading(working bool)

func (*Runner) LockPanel

func (runner *Runner) LockPanel(name string)

func (*Runner) MinsChange

func (runner *Runner) MinsChange(mins, hours, day, month, year int)

func (*Runner) Name

func (runner *Runner) Name() string

func (*Runner) OverrideLight

func (runner *Runner) OverrideLight(enabled bool, r, g, b float32)

func (*Runner) RaisePanel

func (runner *Runner) RaisePanel(name, imageName string)

func (*Runner) RunFx

func (runner *Runner) RunFx(name string)

func (*Runner) SectionLoad

func (runner *Runner) SectionLoad(x, y int, data map[string]interface{})

func (*Runner) SectionSave

func (runner *Runner) SectionSave(x, y int) map[string]interface{}

func (*Runner) SetOverlayBackground

func (runner *Runner) SetOverlayBackground(r, g, b, a uint8)

func (*Runner) ShowMessageAt

func (runner *Runner) ShowMessageAt(worldX, worldY, worldZ int, message string, fontIndex int, r, g, b uint8, rise bool)

func (*Runner) UpdatePanel

func (runner *Runner) UpdatePanel(name string, contents *[]interface{})

func (*Runner) UpdateProgress

func (runner *Runner) UpdateProgress(index int, value, maxValue float64)

func (*Runner) ViewSize

func (runner *Runner) ViewSize() int

func (*Runner) Walk

func (runner *Runner) Walk(sx, sy int)

type UiImageControl

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

type UiOutlineControl

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

func (*UiOutlineControl) HLine

func (c *UiOutlineControl) HLine(x1, y, x2 int)

HLine draws a horizontal line

func (*UiOutlineControl) VLine

func (c *UiOutlineControl) VLine(x, y1, y2 int)

VLine draws a veritcal line

type UiTextControl

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

Jump to

Keyboard shortcuts

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