Chunks
Moddable voxel sandbox for room-scale VR.
Protected Member Functions | Protected Attributes | Properties | List of all members
Chunks.Controls.Text Class Reference

Control used to display a string. More...

Inheritance diagram for Chunks.Controls.Text:
Chunks.Controls.Control

Protected Member Functions

override void OnUpdateTextSubstitutions ()
 
override void OnInitialize ()
 Called only once, when the component is first attached to an entity and is ready to add or retrieve other components. More...
 
- Protected Member Functions inherited from Chunks.Controls.Control
override void OnInitialize ()
 Called only once, when the component is first attached to an entity and is ready to add or retrieve other components. More...
 
ResourceName GetResourceName (JToken token)
 Converts a json token to a resource name, associating it with the current namespace. Only valid from within OnReadJson. More...
 
virtual void OnChildLoadedFromLayout (Control child)
 Invoked when a new child is created as specified by a json layout object. More...
 
virtual void OnLayoutLoaded (bool firstTime)
 Invoked when the control's layout has been (re)loaded. More...
 
virtual bool GetChildBounds (out Bounds bounds)
 
override void OnUpdate ()
 Called once per world update if this component and its parent entity are enabled. More...
 
virtual void OnPointerEnter (PointerEventArgs e)
 
virtual void OnPointerLeave (PointerEventArgs e)
 
virtual void OnPointerClick (PointerEventArgs e)
 
virtual void OnPointerPress (PointerEventArgs e)
 
virtual void OnPointerRelease (PointerEventArgs e)
 
virtual void OnPointerBeginDrag (PointerEventArgs e)
 
virtual void OnPointerEndDrag (PointerEventArgs e)
 
virtual void OnPointerDrag (PointerEventArgs e)
 
virtual void OnPointerScroll (PointerEventArgs e)
 
string GetSubstitutedText (string format)
 

Protected Attributes

override bool IncludeSelfInBounds => true
 
- Protected Attributes inherited from Chunks.Controls.Control
virtual bool IncludeSelfInBounds => false
 

Properties

string Value [get, set]
 String currently being displayed by the Text. More...
 
Color Color [get, set]
 Color of the displayed text. More...
 
int FontSize [get, set]
 Size of the displayed text. More...
 
int MaxFontSize [get, set]
 Maximum font size when automatically scaling. More...
 
int MinFontSize [get, set]
 Minimum font size when automatically scaling. More...
 
bool AutoScaleText [get, set]
 If true, the font size will automatically be scaled between MinFontSize and MaxFontSize to best fit the text's bounds. More...
 
FontStyle FontStyle [get, set]
 
HorzAlign HorizontalAlign [get, set]
 Horizontal alignment of the displayed text. More...
 
VertAlign VerticalAlign [get, set]
 Vertical alignment of the displayed text. More...
 
- Properties inherited from Chunks.Controls.Control
MenuPanel MenuPanel [get, set]
 
PointerEventHandler PointerEntered
 
PointerEventHandler PointerLeft
 
PointerEventHandler PointerClicked
 
PointerEventHandler PointerPressed
 
PointerEventHandler PointerReleased
 
PointerEventHandler PointerBeginDragging
 
PointerEventHandler PointerEndDragging
 
PointerEventHandler PointerDragging
 
PointerEventHandler PointerScrolling
 

Additional Inherited Members

- Public Member Functions inherited from Chunks.Controls.Control
 Control ()
 
TControl CreateChildControl< TControl > ()
 Creates a new Entity as a child of this one with an instance of the given Control type attached to it, which is returned. More...
 
Control CreateChildControl (Type type)
 Creates a new Entity as a child of this one with an instance of the given Control type attached to it, which is returned. More...
 
Control CreateChildControl (ResourceName resName)
 Creates a new Entity as a child of this one with a Control attached to it, as defined by the control layout resource specified by the given resource name. More...
 
Bounds GetChildBounds ()
 
delegate void PointerEventHandler (Control sender, PointerEventArgs e)
 
void SetTextSubstitution (string key, string value)
 
string GetTextSubstitution (string key)
 
- Public Attributes inherited from Chunks.Controls.Control
new ControlTransform Transform => (ControlTransform) base.Transform
 The transformation of the entity this instance is attached to. More...
 

Detailed Description

Control used to display a string.

Member Function Documentation

override void Chunks.Controls.Text.OnInitialize ( )
protected

Called only once, when the component is first attached to an entity and is ready to add or retrieve other components.

override void Chunks.Controls.Text.OnUpdateTextSubstitutions ( )
protectedvirtual

Reimplemented from Chunks.Controls.Control.

Member Data Documentation

override bool Chunks.Controls.Text.IncludeSelfInBounds => true
protected

Property Documentation

bool Chunks.Controls.Text.AutoScaleText
getset

If true, the font size will automatically be scaled between MinFontSize and MaxFontSize to best fit the text's bounds.

Color Chunks.Controls.Text.Color
getset

Color of the displayed text.

int Chunks.Controls.Text.FontSize
getset

Size of the displayed text.

FontStyle Chunks.Controls.Text.FontStyle
getset
HorzAlign Chunks.Controls.Text.HorizontalAlign
getset

Horizontal alignment of the displayed text.

int Chunks.Controls.Text.MaxFontSize
getset

Maximum font size when automatically scaling.

int Chunks.Controls.Text.MinFontSize
getset

Minimum font size when automatically scaling.

string Chunks.Controls.Text.Value
getset

String currently being displayed by the Text.

VertAlign Chunks.Controls.Text.VerticalAlign
getset

Vertical alignment of the displayed text.


The documentation for this class was generated from the following file: