app

package
v0.0.0-...-c744f44 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application holds state for the tabula application

func New

func New(fileName, project string, win *sdl.Window, cfg *config.Config) *Application

New returns a newly instantiated application state struct

func (*Application) HandleSdlEvent

func (app *Application) HandleSdlEvent(e sdl.Event)

HandleSdlEvent checks the type of a given SDL event and runs the method associated with that event

func (*Application) PostEventActions

func (app *Application) PostEventActions()

PostEventActions performs any necessary actions following event polling

func (*Application) Quit

func (app *Application) Quit()

Quit cleans up resources

func (*Application) Running

func (app *Application) Running() bool

Running returns whether the application is still running

func (*Application) Start

func (app *Application) Start()

Start sets up the state for running

type BottomBar

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

BottomBar defines a solid color bar with text displays

func NewBottomBar

func NewBottomBar(area *sdl.Rect, comms <-chan comms.Image, cfg *config.Config) (*BottomBar, error)

NewBottomBar returns a pointer to a new BottomBar struct that implements ui.Component the background color defaults to grey (0x808080FF) and the text white

func (*BottomBar) Destroy

func (bb *BottomBar) Destroy()

Destroy frees all assets obtained by the ui.Component

func (*BottomBar) InBoundary

func (bb *BottomBar) InBoundary(pt sdl.Point) bool

InBoundary returns whether a point is in this ui.Component's bounds

func (*BottomBar) OnClick

func (bb *BottomBar) OnClick(evt *sdl.MouseButtonEvent) bool

OnClick is called when the user clicks within the ui.Component's region

func (*BottomBar) OnEnter

func (bb *BottomBar) OnEnter()

OnEnter is called when the cursor enters the ui.Component's region

func (*BottomBar) OnLeave

func (bb *BottomBar) OnLeave()

OnLeave is called when the cursor leaves the ui.Component's region

func (*BottomBar) OnMotion

func (bb *BottomBar) OnMotion(evt *sdl.MouseMotionEvent) bool

OnMotion is called when the cursor moves within the ui.Component's region

func (*BottomBar) OnResize

func (bb *BottomBar) OnResize(x, y int32)

OnResize is called when the user resizes the window

func (*BottomBar) OnScroll

func (bb *BottomBar) OnScroll(evt *sdl.MouseWheelEvent) bool

OnScroll is called when the user scrolls within the ui.Component's region

func (*BottomBar) Render

func (bb *BottomBar) Render()

Render draws the ui.Component

func (*BottomBar) SetBackgroundColor

func (bb *BottomBar) SetBackgroundColor(color []float32)

SetBackgroundColor sets the color for the bottom bar's background texture

func (*BottomBar) SetTextColor

func (bb *BottomBar) SetTextColor(color []float32)

SetTextColor sets the color for the bottom bar's text elements

func (*BottomBar) String

func (bb *BottomBar) String() string

String returns the name of the component type

Jump to

Keyboard shortcuts

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