Show / Hide Table of Contents

Class TextNode

Creates a SceneNodeContainer with the proper components and children for rendering text in the UI.

Inheritance
System.Object
SceneNode
TextNode
Implements
INode
Inherited Members
SceneNode.Name
SceneNode.Components
SceneNode.Parent
SceneNode.Children
SceneNode.EnumChildren
SceneNode.EnumComponents
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Gui
Assembly: Fusee.Engine.Gui.dll
Syntax
public class TextNode : SceneNode, INode

Methods

Create(String, String, MinMaxRect, MinMaxRect, FontMap, float4, HorizontalTextAlignment, VerticalTextAlignment)

Initializes a new instance of the TextNode class.

Declaration
public static TextNode Create(string text, string name, MinMaxRect anchors, MinMaxRect offsets, FontMap fontMap, float4 color, HorizontalTextAlignment horizontalAlignment = HorizontalTextAlignment.Left, VerticalTextAlignment verticalTextAlignment = VerticalTextAlignment.Top)
Parameters
Type Name Description
System.String text

The text you want to display.

System.String name

The name of the SceneNodeContainer.

MinMaxRect anchors

Anchors for the mesh. Influences the scaling of the object if the enclosing canvas is resized.

MinMaxRect offsets

The offsets.

FontMap fontMap

Offsets for the mesh. Defines the position of the object relative to its enclosing UI element.

float4 color

The color.

HorizontalTextAlignment horizontalAlignment

The HorizontalTextAlignment defines the text's placement along the enclosing MinMaxRect's x-axis.

VerticalTextAlignment verticalTextAlignment

The HorizontalTextAlignment defines the text's placement along the enclosing MinMaxRect's y-axis.

Returns
Type Description
TextNode

CreateAsync(String, String, MinMaxRect, MinMaxRect, FontMap, float4, HorizontalTextAlignment, VerticalTextAlignment)

Initializes a new instance of the TextNode class.

Declaration
public static async Task<TextNode> CreateAsync(string text, string name, MinMaxRect anchors, MinMaxRect offsets, FontMap fontMap, float4 color, HorizontalTextAlignment horizontalAlignment = HorizontalTextAlignment.Left, VerticalTextAlignment verticalTextAlignment = VerticalTextAlignment.Top)
Parameters
Type Name Description
System.String text

The text you want to display.

System.String name

The name of the SceneNodeContainer.

MinMaxRect anchors

Anchors for the mesh. Influences the scaling of the object if the enclosing canvas is resized.

MinMaxRect offsets

The offsets.

FontMap fontMap

Offsets for the mesh. Defines the position of the object relative to its enclosing UI element.

float4 color

The color.

HorizontalTextAlignment horizontalAlignment

The HorizontalTextAlignment defines the text's placement along the enclosing MinMaxRect's x-axis.

VerticalTextAlignment verticalTextAlignment

The HorizontalTextAlignment defines the text's placement along the enclosing MinMaxRect's y-axis.

Returns
Type Description
System.Threading.Tasks.Task<TextNode>

Implements

INode
Generated by DocFX
GitHub Repo
Back to top