Documentation
¶
Overview ¶
Package pigui offers a minimal API for building GUIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrawEvent ¶
type DrawEvent struct { Element *Element HasPointer bool Pressed bool // contains filtered or unexported fields }
func (DrawEvent) StopPropagation ¶
func (e DrawEvent) StopPropagation()
call it if you don't want the event to be propagated to children
type Element ¶
type Element struct { OnDraw func(DrawEvent) OnUpdate func(UpdateEvent) OnPressed func(Event) OnReleased func(Event) OnTapped func(Event) // contains filtered or unexported fields }
func Attach ¶
Attach attaches a new element with the specified size to the parent.
It returns the newly created element.
func New ¶
func New() *Element
New creates a new GUI root element.
To update and draw the element along with its children, add it to your game loop by calling Element.Update and Element.Draw.
type UpdateEvent ¶
type UpdateEvent struct { Element *Element HasPointer bool // contains filtered or unexported fields }
func (UpdateEvent) StopPropagation ¶
func (e UpdateEvent) StopPropagation()
call it if you don't want the event to be propagated to children
Click to show internal directories.
Click to hide internal directories.