pkg

package
v0.0.0-...-328a337 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

type Window struct {

	// widget that has focus...  I think that will do?
	FocusedWidget *widgets.IWidget
	// contains filtered or unexported fields
}

Window used to define the UI window for the application. Currently will just cater for single window per app. This will be reviewed in the future.

func NewWindow

func NewWindow(width int, height int, title string, haveMenuBar bool, haveToolBar bool) Window

func (*Window) AddKeyboardHandler

func (w *Window) AddKeyboardHandler(handler func(event events.KeyboardEvent) error) error

func (*Window) AddMouseHandler

func (w *Window) AddMouseHandler(handler func(event events.MouseEvent) error) error

func (*Window) AddPanel

func (w *Window) AddPanel(panel widgets.IPanel) error

func (*Window) Draw

func (w *Window) Draw(screen *ebiten.Image)

func (*Window) FindWidgetForInput

func (w *Window) FindWidgetForInput(x float64, y float64) (*widgets.IWidget, error)

FindWidgetForInput Need to make recursive for panels in panels etc... but just leave pretty linear for now.

func (*Window) FindWidgetRecursive

func (w *Window) FindWidgetRecursive(x float64, y float64, widget widgets.IWidget) widgets.IWidget

func (*Window) HandleButtonDownEvent

func (w *Window) HandleButtonDownEvent(event events.MouseEvent) error

func (*Window) HandleButtonUpEvent

func (w *Window) HandleButtonUpEvent(event events.MouseEvent) error

func (*Window) HandleEvent

func (w *Window) HandleEvent(event events.IEvent) error

func (*Window) HandleKeyboardEvent

func (w *Window) HandleKeyboardEvent(event events.KeyboardEvent) error

func (*Window) Layout

func (w *Window) Layout(outsideWidth, outsideHeight int) (int, int)

func (*Window) MainLoop

func (w *Window) MainLoop() error

func (*Window) Update

func (w *Window) Update(screen *ebiten.Image) error

///////////////////// EBiten specifics below... /////////////////////////////////////////////

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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