builtin

package
v0.4.0-preview.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package builtin provides a set of basic components.

Index

Constants

View Source
const (
	GridVertical byte = iota
	GridHorizontal
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteLayout

type AbsoluteLayout struct {
	engine.LayoutImpl
}

func NewAbsoluteLayout

func NewAbsoluteLayout() *AbsoluteLayout

type BezierView

type BezierView struct {
	engine.ViewImpl
	rendering.Appearance
	ControlPoint1, ControlPoint2 a.Vector3
}

func FindBezierView added in v0.3.4

func FindBezierView(so *engine.SceneObject, includeDirty ...bool) *BezierView

func GetBezierView added in v0.3.4

func GetBezierView(so *engine.SceneObject, includeDirty ...bool) *BezierView

func NewBezierView

func NewBezierView(cp1, cp2 a.Vector3) *BezierView

func (*BezierView) OnDraw

func (b *BezierView) OnDraw(ctx engine.DrawingContext)

type BoundaryView

type BoundaryView struct {
	engine.ViewImpl
}

func FindBoundaryView added in v0.3.4

func FindBoundaryView(so *engine.SceneObject, includeDirty ...bool) *BoundaryView

func GetBoundaryView added in v0.3.4

func GetBoundaryView(so *engine.SceneObject, includeDirty ...bool) *BoundaryView

func NewBoundaryView

func NewBoundaryView() *BoundaryView

func (*BoundaryView) OnDraw

func (r *BoundaryView) OnDraw(ctx engine.DrawingContext)

type BuilderComponent

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

func FindBuilderComponent added in v0.3.4

func FindBuilderComponent(so *engine.SceneObject, includeDirty ...bool) *BuilderComponent

func GetBuilderComponent added in v0.3.4

func GetBuilderComponent(so *engine.SceneObject, includeDirty ...bool) *BuilderComponent

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 ClipArea added in v0.3.4

type ClipArea struct {
	engine.UpdatingComponentImpl
	Shape shape.Kind `state:"shape"`
}

func FindClipArea added in v0.3.4

func FindClipArea(so *engine.SceneObject, includeDirty ...bool) *ClipArea

func GetClipArea added in v0.3.4

func GetClipArea(so *engine.SceneObject, includeDirty ...bool) *ClipArea

func NewClipArea added in v0.3.4

func NewClipArea(shape shape.Kind) *ClipArea

func (*ClipArea) IsPointInside

func (c *ClipArea) IsPointInside(point a.Vector3) bool

func (*ClipArea) IsPointInside2D

func (c *ClipArea) IsPointInside2D(point a.Vector3) bool

func (*ClipArea) IsSolid

func (c *ClipArea) IsSolid() bool

func (*ClipArea) OnStop added in v0.3.4

func (c *ClipArea) OnStop()

func (*ClipArea) OnUpdate added in v0.3.4

func (c *ClipArea) OnUpdate(_ engine.UpdateContext)

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 struct {
	engine.ViewImpl

	OnSelect OnSelectHandler
	// contains filtered or unexported fields
}

func FindDropdownView added in v0.3.4

func FindDropdownView(so *engine.SceneObject, includeDirty ...bool) *DropdownView

func GetDropdownView added in v0.3.4

func GetDropdownView(so *engine.SceneObject, includeDirty ...bool) *DropdownView

func NewDropdownView

func NewDropdownView(options []string) *DropdownView
func (d *DropdownView) GetSelectedItem() string
func (d *DropdownView) HandleClick()
func (d *DropdownView) OnDraw(_ engine.DrawingContext)
func (d *DropdownView) OnStart()
func (d *DropdownView) OnStop()
func (d *DropdownView) SetItems(items []string)
func (d *DropdownView) SetSelectedItem(item string)

type EllipseBoundary

type EllipseBoundary struct {
	engine.ComponentImpl
}

func FindCircleBoundary added in v0.3.4

func FindCircleBoundary(so *engine.SceneObject, includeDirty ...bool) *EllipseBoundary

func GetCircleBoundary added in v0.3.4

func GetCircleBoundary(so *engine.SceneObject, includeDirty ...bool) *EllipseBoundary

func NewCircleBoundary

func NewCircleBoundary() *EllipseBoundary

func (*EllipseBoundary) IsPointInside

func (s *EllipseBoundary) IsPointInside(point a.Vector3) bool

func (*EllipseBoundary) IsPointInside2D

func (s *EllipseBoundary) IsPointInside2D(point a.Vector3) bool

func (*EllipseBoundary) IsSolid

func (s *EllipseBoundary) IsSolid() bool

type EventListener added in v0.1.2

type EventListener struct {
	engine.ComponentImpl
	EventCode int                 `state:"eventCode"`
	Handler   engine.EventHandler `state:"handler"`
}

EventListener is used to detect and handle scene object events. It reacts to the events with the specified code and invokes the specified event handler.

func FindEventListener added in v0.3.4

func FindEventListener(so *engine.SceneObject, includeDirty ...bool) *EventListener

func GetEventListener added in v0.3.4

func GetEventListener(so *engine.SceneObject, includeDirty ...bool) *EventListener

func NewEventListener added in v0.1.2

func NewEventListener(eventCode int, handler engine.EventHandler) *EventListener

NewEventListener creates a new EventListener, that reacts to the events with the specified code and invokes the specified handler.

func (*EventListener) OnMessage added in v0.1.2

func (l *EventListener) OnMessage(msg *dispatch.Message) bool

type GridColumnDefinition added in v0.2.7

type GridColumnDefinition struct {
	Width float32
	// contains filtered or unexported fields
}

func (*GridColumnDefinition) FromMap added in v0.2.7

func (c *GridColumnDefinition) FromMap(siMap a.SiMap)

func (*GridColumnDefinition) ToMap added in v0.2.7

func (c *GridColumnDefinition) ToMap() a.SiMap

type GridLayout

type GridLayout struct {
	engine.LayoutImpl
	Orientation    byte                    `state:"orientation"`
	AutoExpansion  bool                    `state:"autoExpansion"`
	AutoShrinking  bool                    `state:"autoShrinking"`
	AutoSizeAdjust bool                    `state:"autoSizeAdjust"`
	RowPadding     float32                 `state:"rowPadding"`
	ColumnPadding  float32                 `state:"columnPadding"`
	Rows           []*GridRowDefinition    `state:"rows"`
	Columns        []*GridColumnDefinition `state:"columns"`
}

GridLayout is a simple layout component, that organizes its children into a grid. Each child is placed in cell after previous. If the orientation is vertical, the children are first places in rows from left to right. When a row is filled, the next row below is filled and so on. If the orientation is horizontal first columns are filled from top to bottom. When the column is filled, the next to the right is used. To use the grid you need to specify columns and rows definitions using AddColumn and AddRow methods respectively. For each row/column you can specify its height/width. You can set either a value in pixels or the special values a.FillParent and a.WrapContent. For a.WrapContent the row/col will take the size of the biggest child. For a.FillParent the row/col will try to fill all the available space not occupied by other rows/cols.

func FindGridLayout added in v0.3.4

func FindGridLayout(so *engine.SceneObject, includeDirty ...bool) *GridLayout

func GetGridLayout added in v0.3.4

func GetGridLayout(so *engine.SceneObject, includeDirty ...bool) *GridLayout

func NewGridLayout

func NewGridLayout() *GridLayout

NewGridLayout creates a new empty GridLayout.

func NewGridLayoutSized added in v0.2.7

func NewGridLayoutSized(rows, cols int) *GridLayout

NewGridLayoutSized creates a new GridLayout with the given number of rows and columns.

func (*GridLayout) AddColumn added in v0.2.7

func (l *GridLayout) AddColumn(width float32)

AddColumn add new column definition with the given width to the grid. The width may be eiter a value in pixels or a.WrapContent or a.FillParent.

func (*GridLayout) AddRow added in v0.2.7

func (l *GridLayout) AddRow(height float32)

AddRow add new row definition with the given height to the grid. The height may be eiter a value in pixels or a.WrapContent or a.FillParent.

func (*GridLayout) GetColumns added in v0.2.7

func (l *GridLayout) GetColumns() []*GridColumnDefinition

GetColumns returns the slice of all column definitions. Modifying the returned slice won't modify the actual columns of the grid.

func (*GridLayout) GetColumnsCount added in v0.2.7

func (l *GridLayout) GetColumnsCount() int

GetColumnsCount returns the number of columns in the grid.

func (*GridLayout) GetRows added in v0.2.7

func (l *GridLayout) GetRows() []*GridRowDefinition

GetRows returns the slice of all row definitions. Modifying the returned slice won't modify the actual rows of the grid.

func (*GridLayout) GetRowsCount added in v0.2.7

func (l *GridLayout) GetRowsCount() int

GetRowsCount returns the number of rows in the grid.

func (*GridLayout) LayoutChildren

func (l *GridLayout) LayoutChildren()

LayoutChildren implements the engine.Layout interface.

func (*GridLayout) MeasureContents

func (l *GridLayout) MeasureContents() a.Vector3

func (*GridLayout) RemoveColumn added in v0.2.7

func (l *GridLayout) RemoveColumn()

RemoveColumn removes the last column if the grid. Objects in that column will no longer be visible.

func (*GridLayout) RemoveColumnAt added in v0.2.7

func (l *GridLayout) RemoveColumnAt(index int)

RemoveColumnAt removes column at the given index. Note that the children in that column will not be removed, but moved to the column row if one exists.

func (*GridLayout) RemoveRow added in v0.2.7

func (l *GridLayout) RemoveRow()

RemoveRow removes the last row of the grid. Objects in that row will no longer be visible.

func (*GridLayout) RemoveRowAt added in v0.2.7

func (l *GridLayout) RemoveRowAt(index int)

RemoveRowAt removes row at the given index. Note that the children in that row will not be removed, but moved to the next row if one exists.

func (*GridLayout) SetColumnWidth added in v0.2.7

func (l *GridLayout) SetColumnWidth(colIndex int, width float32)

SetColumnWidth sets the width of the column at the given index.

func (*GridLayout) SetRowHeight added in v0.2.7

func (l *GridLayout) SetRowHeight(rowIndex int, height float32)

SetRowHeight sets the height of the row at the given index.

type GridRowDefinition added in v0.2.7

type GridRowDefinition struct {
	Height float32
	// contains filtered or unexported fields
}

func (*GridRowDefinition) FromMap added in v0.2.7

func (r *GridRowDefinition) FromMap(siMap a.SiMap)

func (*GridRowDefinition) ToMap added in v0.2.7

func (r *GridRowDefinition) ToMap() a.SiMap

type ImageView

type ImageView struct {
	engine.ViewImpl
	ResId    a.ResId `state:"resId"`
	ImageUrl string  `state:"imageUrl"`
	// contains filtered or unexported fields
}

ImageView displays an image given its resource id or url. Supports jpeg, png and gif formats. Supports file system path or http urls.

func FindImageView added in v0.3.4

func FindImageView(so *engine.SceneObject, includeDirty ...bool) *ImageView

func GetImageView added in v0.3.4

func GetImageView(so *engine.SceneObject, includeDirty ...bool) *ImageView

func NewImageView

func NewImageView(image interface{}) *ImageView

NewImageView creates a new ImageView given a resource id or an url of an image.

func (*ImageView) ImageType

func (v *ImageView) ImageType() string

ImageType returns the type of loaded image. The possible values are - "jpeg", "png" or "gif".

func (*ImageView) IsAnimating

func (v *ImageView) IsAnimating() bool

IsAnimating checks if this image is currently animating.

func (*ImageView) MeasureContents

func (v *ImageView) MeasureContents() a.Vector3

func (*ImageView) OnDraw

func (v *ImageView) OnDraw(ctx engine.DrawingContext)

func (*ImageView) OnStart

func (v *ImageView) OnStart()

func (*ImageView) OnStop

func (v *ImageView) OnStop()

func (*ImageView) OnUpdate

func (v *ImageView) OnUpdate(_ engine.UpdateContext)

func (*ImageView) ResumeAnimation

func (v *ImageView) ResumeAnimation()

ResumeAnimation resumes the animation of a gif image from the frame it was stopped on.

func (*ImageView) SetImageUrl added in v0.1.1

func (v *ImageView) SetImageUrl(url string)

SetImageUrl sets the image url equal to the specified value, forcing the view to redraw and requesting rendering.

func (*ImageView) SetResId added in v0.1.7

func (v *ImageView) SetResId(i a.ResId)

SetResId sets the resource index equal to the specified value, forcing the view to redraw and requesting rendering.

func (*ImageView) StartAnimation

func (v *ImageView) StartAnimation()

StartAnimation starts the animation of a gif image from the beginning.

func (*ImageView) StopAnimation

func (v *ImageView) StopAnimation()

StopAnimation stops the animation of a gif image.

type MouseMover

type MouseMover struct {
	engine.UpdatingComponentImpl
	// contains filtered or unexported fields
}

func FindMouseMover added in v0.3.4

func FindMouseMover(so *engine.SceneObject, includeDirty ...bool) *MouseMover

func GetMouseMover added in v0.3.4

func GetMouseMover(so *engine.SceneObject, includeDirty ...bool) *MouseMover

func NewMouseMover

func NewMouseMover() *MouseMover

func (*MouseMover) OnStart

func (m *MouseMover) OnStart()

func (*MouseMover) OnStop

func (m *MouseMover) OnStop()

func (*MouseMover) OnUpdate

func (m *MouseMover) OnUpdate(_ engine.UpdateContext)

type NativeInputView added in v0.1.1

type NativeInputView struct {
	engine.ComponentImpl
	// contains filtered or unexported fields
}

NativeInputView component displays a native input widget for current platform.

func FindNativeInputView added in v0.3.4

func FindNativeInputView(so *engine.SceneObject, includeDirty ...bool) *NativeInputView

func GetNativeInputView added in v0.3.4

func GetNativeInputView(so *engine.SceneObject, includeDirty ...bool) *NativeInputView

func NewNativeInputView added in v0.1.1

func NewNativeInputView(values ...string) *NativeInputView

NewNativeInputView creates a new NativeInputView. Returns pointer to the instance. This function takes a set of parameters to initialize the input view. All of them are optional. The parameters are in the following order: 0 - initial text 1 - initial hint Further values are ignored.

func (*NativeInputView) ForceRedraw added in v0.1.1

func (n *NativeInputView) ForceRedraw()

func (*NativeInputView) GetHint added in v0.1.1

func (n *NativeInputView) GetHint() string

GetHint returns the current hint value of the input view.

func (*NativeInputView) GetText added in v0.1.1

func (n *NativeInputView) GetText() string

GetText returns the current text value of the input view.

func (*NativeInputView) OnDraw added in v0.1.1

func (n *NativeInputView) OnDraw(ctx engine.DrawingContext)

func (*NativeInputView) OnInit added in v0.1.1

func (n *NativeInputView) OnInit(ctx engine.InitContext)

func (*NativeInputView) OnStart added in v0.1.1

func (n *NativeInputView) OnStart()

func (*NativeInputView) OnStop added in v0.1.1

func (n *NativeInputView) OnStop()

func (*NativeInputView) SetHint added in v0.1.1

func (n *NativeInputView) SetHint(hint string)

SetHint updates the hint text of the input view.

func (*NativeInputView) SetOnTextChangeListener added in v0.1.1

func (n *NativeInputView) SetOnTextChangeListener(listener func(text string))

SetOnTextChangeListener sets the callback that is invoked when the text of the input view is changed.

func (*NativeInputView) SetText added in v0.1.1

func (n *NativeInputView) SetText(text string)

SetText updates the text.

type OnClickListener

type OnClickListener struct {
	engine.ComponentImpl
	OnClick engine.EventHandler `state:"onClick"`
}

OnClickListener detects clicks on the scene object and calls the specified engine.EventHandler. For click detection to work remember to add a component that implements engine.BoundaryComponent to the scene object.

func FindOnClickListener added in v0.3.4

func FindOnClickListener(so *engine.SceneObject, includeDirty ...bool) *OnClickListener

func GetOnClickListener added in v0.3.4

func GetOnClickListener(so *engine.SceneObject, includeDirty ...bool) *OnClickListener

func NewOnClickListener

func NewOnClickListener(handler engine.EventHandler) *OnClickListener

NewOnClickListener creates a new OnClickListener component with the specified event handler.

func (*OnClickListener) OnMessage

func (l *OnClickListener) OnMessage(m *dispatch.Message) bool

type OnSelectHandler

type OnSelectHandler func(item string)

type Padding

type Padding struct {
	engine.LayoutImpl
	EdgeInsets *common.EdgeInsets `state:"edgeInsets"`
}

func NewPadding

func NewPadding(insets *common.EdgeInsets) *Padding

func (*Padding) LayoutChildren

func (s *Padding) LayoutChildren()

func (*Padding) MeasureContents

func (s *Padding) MeasureContents() a.Vector3

type RectBoundary

type RectBoundary struct {
	engine.ComponentImpl
}

func FindRectBoundary added in v0.3.4

func FindRectBoundary(so *engine.SceneObject, includeDirty ...bool) *RectBoundary

func GetRectBoundary added in v0.3.4

func GetRectBoundary(so *engine.SceneObject, includeDirty ...bool) *RectBoundary

func NewRectBoundary

func NewRectBoundary() *RectBoundary

func (*RectBoundary) IsPointInside

func (r *RectBoundary) IsPointInside(point a.Vector3) bool

func (*RectBoundary) IsPointInside2D

func (r *RectBoundary) IsPointInside2D(point a.Vector3) bool

func (*RectBoundary) IsSolid

func (r *RectBoundary) IsSolid() bool

type Scroll

type Scroll struct {
	engine.LayoutImpl
	// contains filtered or unexported fields
}

func NewScroll

func NewScroll() *Scroll

func (*Scroll) IsPointInside

func (s *Scroll) IsPointInside(point a.Vector3) bool

func (*Scroll) IsPointInside2D

func (s *Scroll) IsPointInside2D(point a.Vector3) bool

func (*Scroll) IsSolid

func (s *Scroll) IsSolid() bool

func (*Scroll) LayoutChildren

func (s *Scroll) LayoutChildren()

func (*Scroll) OnLateUpdate

func (s *Scroll) OnLateUpdate(_ engine.UpdateContext)

func (*Scroll) OnStart

func (s *Scroll) OnStart()

func (*Scroll) OnStop

func (s *Scroll) OnStop()

func (*Scroll) OnUpdate

func (s *Scroll) OnUpdate(_ engine.UpdateContext)

type ScrollDirection

type ScrollDirection byte
const (
	ScrollUp ScrollDirection = iota
	ScrollDown
	ScrollRight
	ScrollLeft
	ScrollNone
)

type Selection

type Selection struct {
	Start, End int
	Direction  byte
}

func (*Selection) IndexInSelection

func (r *Selection) IndexInSelection(index int) bool

func (*Selection) Length

func (r *Selection) Length() int

func (*Selection) Move

func (r *Selection) Move(by int)

func (*Selection) MoveEnd

func (r *Selection) MoveEnd(by int)

func (*Selection) MoveStart

func (r *Selection) MoveStart(by int)

func (*Selection) SetPosition

func (r *Selection) SetPosition(pos int)

type ShapeView

type ShapeView struct {
	engine.ViewImpl
	FillColor    a.Color `state:"fillColor"`
	StrokeColor  a.Color `state:"strokeColor"`
	StrokeWeight byte    `state:"strokeWeight"`
	CornerRadius byte    `state:"cornerRadius"`
	PType        byte    `state:"pType"`
}

ShapeView displays a basic Shape: rectangle, ellipse, triangle, line, point.

func FindShapeView added in v0.3.4

func FindShapeView(so *engine.SceneObject, includeDirty ...bool) *ShapeView

func GetShapeView added in v0.3.4

func GetShapeView(so *engine.SceneObject, includeDirty ...bool) *ShapeView

func NewShapeView

func NewShapeView(pType ShapeType) *ShapeView

func (*ShapeView) OnDraw

func (c *ShapeView) OnDraw(ctx engine.DrawingContext)

type StartFunc

type StartFunc struct {
	engine.ComponentImpl
	// contains filtered or unexported fields
}

func NewStartFunc

func NewStartFunc(action func()) *StartFunc

func (*StartFunc) OnStart

func (s *StartFunc) OnStart()

type TextInput

type TextInput struct {
	engine.ViewImpl
	CursorColor      a.Color             `state:"cursorColor"`
	SelectionColor   a.Color             `state:"selectionColor"`
	InitialText      string              `state:"initialText"`
	OnChangeListener engine.EventHandler `state:"onChangeListener"`
	// contains filtered or unexported fields
}

func NewTextInput

func NewTextInput() *TextInput

func (*TextInput) GetSelectedText

func (s *TextInput) GetSelectedText() string

func (*TextInput) GetText

func (s *TextInput) GetText() string

func (*TextInput) OnDraw

func (s *TextInput) OnDraw(ctx engine.DrawingContext)

func (*TextInput) OnInit

func (s *TextInput) OnInit(ctx engine.InitContext)

func (*TextInput) OnLateUpdate

func (s *TextInput) OnLateUpdate(_ engine.UpdateContext)

func (*TextInput) OnMessage

func (s *TextInput) OnMessage(msg *dispatch.Message) bool

func (*TextInput) OnStart

func (s *TextInput) OnStart()

func (*TextInput) OnStop

func (s *TextInput) OnStop()

func (*TextInput) OnUpdate

func (s *TextInput) OnUpdate(_ engine.UpdateContext)

func (*TextInput) SetOnChangeListener

func (s *TextInput) SetOnChangeListener(listener func(newValue string))

func (*TextInput) SetText

func (s *TextInput) SetText(newText string)

type TextView

type TextView struct {
	engine.ViewImpl
	TextColor  a.Color     `state:"textColor"`
	Font       string      `state:"font"`
	FontSize   byte        `state:"fontSize"`
	FontWeight byte        `state:"fontWeight"`
	Text       string      `state:"text"`
	HTextAlign a.TextAlign `state:"hTextAlign"`
	VTextAlign a.TextAlign `state:"vTextAlign"`
	SingleLine bool        `state:"singleLine"`
	// contains filtered or unexported fields
}

TextView component displays the given text

func FindTextView added in v0.3.4

func FindTextView(so *engine.SceneObject, includeDirty ...bool) *TextView

func GetTextView added in v0.3.4

func GetTextView(so *engine.SceneObject, includeDirty ...bool) *TextView

func NewTextView

func NewTextView(text string) *TextView

NewTextView creates a new TextView with the given text.

func (*TextView) GetAText added in v0.3.4

func (t *TextView) GetAText() *atext.Text

func (*TextView) GetText

func (t *TextView) GetText() string

GetText returns the current text value.

func (*TextView) MeasureContents

func (t *TextView) MeasureContents() a.Vector3

func (*TextView) OnDraw

func (t *TextView) OnDraw(ctx engine.DrawingContext)

func (*TextView) OnInit added in v0.3.4

func (t *TextView) OnInit(ctx engine.InitContext)

func (*TextView) OnLateUpdate

func (t *TextView) OnLateUpdate(_ engine.UpdateContext)

func (*TextView) SetFontSize added in v0.1.7

func (t *TextView) SetFontSize(fontSize byte)

SetFontSize sets the current text size.

func (*TextView) SetHTextAlign added in v0.1.7

func (t *TextView) SetHTextAlign(align a.TextAlign)

SetHTextAlign sets the current horizontal text alignment.

func (*TextView) SetSingleLine added in v0.3.4

func (t *TextView) SetSingleLine(singleLine bool)

SetSingleLine sets if the text should be on single line.

func (*TextView) SetText

func (t *TextView) SetText(text string)

SetText sets the text equal to the specified value, forcing the view to redraw and requesting rendering.

func (*TextView) SetTextColor added in v0.1.7

func (t *TextView) SetTextColor(color interface{})

SetTextColor sets the current text color.

func (*TextView) SetVTextAlign added in v0.1.7

func (t *TextView) SetVTextAlign(align a.TextAlign)

SetVTextAlign sets the current horizontal text alignment.

type TriangleBoundary

type TriangleBoundary struct {
	engine.ComponentImpl
}

func FindTriangleBoundary added in v0.3.4

func FindTriangleBoundary(so *engine.SceneObject, includeDirty ...bool) *TriangleBoundary

func GetTriangleBoundary added in v0.3.4

func GetTriangleBoundary(so *engine.SceneObject, includeDirty ...bool) *TriangleBoundary

func NewTriangleBoundary

func NewTriangleBoundary() *TriangleBoundary

func (*TriangleBoundary) IsPointInside

func (r *TriangleBoundary) IsPointInside(point a.Vector3) bool

func (*TriangleBoundary) IsPointInside2D

func (r *TriangleBoundary) IsPointInside2D(point a.Vector3) bool

func (*TriangleBoundary) IsSolid

func (r *TriangleBoundary) IsSolid() bool

type UpdateFunc

type UpdateFunc struct {
	engine.UpdatingComponentImpl
	// contains filtered or unexported fields
}

func NewUpdateFunc

func NewUpdateFunc(action func(ctx engine.UpdateContext)) *UpdateFunc

func (*UpdateFunc) OnUpdate

func (u *UpdateFunc) OnUpdate(ctx engine.UpdateContext)

Jump to

Keyboard shortcuts

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