Documentation
¶
Index ¶
- type BezierView
- type BoundaryView
- type BuilderComponent
- type CircleBoundary
- type ClickHandler
- type ComponentBuilder
- type DropdownView
- func (d *DropdownView) GetName() string
- func (d *DropdownView) GetSelectedItem() string
- func (d *DropdownView) HandleClick()
- func (d *DropdownView) OnDraw(ctx engine.DrawingContext)
- func (d *DropdownView) OnStart()
- func (d *DropdownView) OnStop()
- func (d *DropdownView) SetItems(items []string)
- func (d *DropdownView) SetSelectedItem(item string)
- type GridLayout
- type ImageView
- type InputField
- type InputView
- type MouseMover
- type OnClickListener
- type OnSelectHandler
- type RectBoundary
- type ShapeView
- type TextView
- type TriangleBoundary
- type ViewImpl
- func (v *ViewImpl) ForceRedraw()
- func (v *ViewImpl) GetName() string
- func (v *ViewImpl) OnDraw(_ engine.DrawingContext)
- func (v *ViewImpl) OnInit(ctx engine.InitContext)
- func (v *ViewImpl) OnMessage(message engine.Message) bool
- func (v *ViewImpl) OnStart()
- func (v *ViewImpl) OnStop()
- func (v *ViewImpl) ShouldRedraw() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BezierView ¶
type BezierView struct { ViewImpl rendering.Appearance ControlPoint1, ControlPoint2 a.Vector3 }
func NewBezierView ¶
func NewBezierView(cp1, cp2 a.Vector3) *BezierView
func (*BezierView) GetName ¶
func (b *BezierView) GetName() string
func (*BezierView) OnDraw ¶
func (b *BezierView) OnDraw(ctx engine.DrawingContext)
type BoundaryView ¶
type BoundaryView struct {
ViewImpl
}
func NewBoundaryView ¶
func NewBoundaryView() *BoundaryView
func (*BoundaryView) GetName ¶
func (r *BoundaryView) GetName() string
func (*BoundaryView) OnDraw ¶
func (r *BoundaryView) OnDraw(ctx engine.DrawingContext)
type BuilderComponent ¶
type BuilderComponent struct {
// contains filtered or unexported fields
}
func (*BuilderComponent) GetName ¶
func (c *BuilderComponent) GetName() string
func (*BuilderComponent) OnInit ¶
func (c *BuilderComponent) OnInit(ctx engine.InitContext)
func (*BuilderComponent) OnStart ¶
func (c *BuilderComponent) OnStart()
func (*BuilderComponent) OnStop ¶
func (c *BuilderComponent) OnStop()
func (*BuilderComponent) OnUpdate ¶
func (c *BuilderComponent) OnUpdate(ctx engine.UpdateContext)
type CircleBoundary ¶
type CircleBoundary struct {
// contains filtered or unexported fields
}
func NewCircleBoundary ¶
func NewCircleBoundary() *CircleBoundary
func (*CircleBoundary) GetName ¶
func (r *CircleBoundary) GetName() string
func (*CircleBoundary) IsPointInside ¶
func (r *CircleBoundary) IsPointInside(_ a.Vector3) bool
func (*CircleBoundary) IsPointInside2D ¶
func (r *CircleBoundary) IsPointInside2D(point a.Vector3) bool
func (*CircleBoundary) OnInit ¶
func (r *CircleBoundary) OnInit(ctx engine.InitContext)
func (*CircleBoundary) OnStart ¶
func (r *CircleBoundary) OnStart()
func (*CircleBoundary) OnStop ¶
func (r *CircleBoundary) OnStop()
type ClickHandler ¶
type ClickHandler func(vector3 a.IntVector3) bool
type ComponentBuilder ¶
type ComponentBuilder struct {
// contains filtered or unexported fields
}
func NewComponentBuilder ¶
func NewComponentBuilder(name string) *ComponentBuilder
func (*ComponentBuilder) Build ¶
func (b *ComponentBuilder) Build() *BuilderComponent
func (*ComponentBuilder) OnStart ¶
func (b *ComponentBuilder) OnStart(onStart func()) *ComponentBuilder
func (*ComponentBuilder) OnStop ¶
func (b *ComponentBuilder) OnStop(onStop func()) *ComponentBuilder
func (*ComponentBuilder) OnUpdate ¶
func (b *ComponentBuilder) OnUpdate(onUpdate func(ctx engine.UpdateContext)) *ComponentBuilder
type DropdownView ¶
type DropdownView struct { ViewImpl OnSelect OnSelectHandler // contains filtered or unexported fields }
func NewDropdownView ¶
func NewDropdownView(options []string) *DropdownView
func (*DropdownView) GetName ¶
func (d *DropdownView) GetName() string
func (*DropdownView) GetSelectedItem ¶
func (d *DropdownView) GetSelectedItem() string
func (*DropdownView) HandleClick ¶
func (d *DropdownView) HandleClick()
func (*DropdownView) OnDraw ¶
func (d *DropdownView) OnDraw(ctx engine.DrawingContext)
func (*DropdownView) OnStart ¶
func (d *DropdownView) OnStart()
func (*DropdownView) OnStop ¶
func (d *DropdownView) OnStop()
func (*DropdownView) SetItems ¶
func (d *DropdownView) SetItems(items []string)
func (*DropdownView) SetSelectedItem ¶
func (d *DropdownView) SetSelectedItem(item string)
type GridLayout ¶
type GridLayout struct { engine.ComponentImpl Rows int `state:"rows"` Cols int `state:"cols"` RowPadding int `state:"rowPadding"` ColPadding int `state:"colPadding"` }
func NewGridLayout ¶
func NewGridLayout() *GridLayout
func (*GridLayout) GetName ¶
func (l *GridLayout) GetName() string
func (*GridLayout) LayoutChildren ¶
func (l *GridLayout) LayoutChildren()
type ImageView ¶
Displays an image given it's resource index
func NewImageView ¶
func (*ImageView) OnDraw ¶
func (v *ImageView) OnDraw(ctx engine.DrawingContext)
type InputField ¶
type InputField struct { ViewImpl rendering.Appearance Padding float32 AllowMultiline bool // contains filtered or unexported fields }
func NewInputField ¶
func NewInputField() *InputField
func (*InputField) GetName ¶
func (f *InputField) GetName() string
func (*InputField) OnDraw ¶
func (f *InputField) OnDraw(ctx engine.DrawingContext)
func (*InputField) OnStart ¶
func (f *InputField) OnStart()
type InputView ¶
func NewInputView ¶
func NewInputView() *InputView
type MouseMover ¶
type MouseMover struct {
// contains filtered or unexported fields
}
func NewMouseMover ¶
func NewMouseMover() *MouseMover
func (*MouseMover) GetName ¶
func (m *MouseMover) GetName() string
func (*MouseMover) OnInit ¶
func (m *MouseMover) OnInit(ctx engine.InitContext)
func (*MouseMover) OnStart ¶
func (m *MouseMover) OnStart()
func (*MouseMover) OnStop ¶
func (m *MouseMover) OnStop()
func (*MouseMover) OnUpdate ¶
func (m *MouseMover) OnUpdate(_ engine.UpdateContext)
type OnClickListener ¶
type OnClickListener struct { OnClick engine.EventHandler `state:"onClick"` // contains filtered or unexported fields }
func NewOnClickListener ¶
func NewOnClickListener(handler engine.EventHandler) *OnClickListener
func (*OnClickListener) GetName ¶
func (l *OnClickListener) GetName() string
func (*OnClickListener) OnInit ¶
func (l *OnClickListener) OnInit(ctx engine.InitContext)
func (*OnClickListener) OnStart ¶
func (l *OnClickListener) OnStart()
func (*OnClickListener) OnStop ¶
func (l *OnClickListener) OnStop()
type OnSelectHandler ¶
type OnSelectHandler func(item string)
type RectBoundary ¶
type RectBoundary struct {
// contains filtered or unexported fields
}
func NewRectBoundary ¶
func NewRectBoundary() *RectBoundary
func (*RectBoundary) GetName ¶
func (r *RectBoundary) GetName() string
func (*RectBoundary) IsPointInside ¶
func (r *RectBoundary) IsPointInside(point a.Vector3) bool
func (*RectBoundary) IsPointInside2D ¶
func (r *RectBoundary) IsPointInside2D(point a.Vector3) bool
func (*RectBoundary) OnInit ¶
func (r *RectBoundary) OnInit(ctx engine.InitContext)
func (*RectBoundary) OnStart ¶
func (r *RectBoundary) OnStart()
func (*RectBoundary) OnStop ¶
func (r *RectBoundary) OnStop()
type ShapeView ¶
type ShapeView struct { ViewImpl FillColor a.Color `state:"fillColor"` StrokeColor a.Color `state:"strokeColor"` StrokeWeight byte `state:"strokeWeight"` CornerRadius byte `state:"cornerRadius"` // contains filtered or unexported fields }
Displays a basic shape: rectangle, ellipse, triangle, line, point.
func NewShapeView ¶
func (*ShapeView) OnDraw ¶
func (c *ShapeView) OnDraw(ctx engine.DrawingContext)
type TextView ¶
type TextView struct { ViewImpl TextColor a.Color `state:"textColor"` Font string `state:"font"` FontSize byte `state:"fontSize"` FontWeight byte `state:"fontWeight"` Text string `state:"text"` }
Component for displaying text
func NewTextView ¶
func (*TextView) OnDraw ¶
func (t *TextView) OnDraw(ctx engine.DrawingContext)
type TriangleBoundary ¶
type TriangleBoundary struct {
// contains filtered or unexported fields
}
func NewTriangleBoundary ¶
func NewTriangleBoundary() *TriangleBoundary
func (*TriangleBoundary) GetName ¶
func (r *TriangleBoundary) GetName() string
func (*TriangleBoundary) IsPointInside ¶
func (r *TriangleBoundary) IsPointInside(_ a.Vector3) bool
func (*TriangleBoundary) IsPointInside2D ¶
func (r *TriangleBoundary) IsPointInside2D(point a.Vector3) bool
func (*TriangleBoundary) OnInit ¶
func (r *TriangleBoundary) OnInit(ctx engine.InitContext)
func (*TriangleBoundary) OnStart ¶
func (r *TriangleBoundary) OnStart()
func (*TriangleBoundary) OnStop ¶
func (r *TriangleBoundary) OnStop()
type ViewImpl ¶
type ViewImpl struct {
// contains filtered or unexported fields
}
func (*ViewImpl) ForceRedraw ¶
func (v *ViewImpl) ForceRedraw()
func (*ViewImpl) OnDraw ¶
func (v *ViewImpl) OnDraw(_ engine.DrawingContext)
func (*ViewImpl) OnInit ¶
func (v *ViewImpl) OnInit(ctx engine.InitContext)
func (*ViewImpl) ShouldRedraw ¶
Click to show internal directories.
Click to hide internal directories.