Entity used to render text on screen. Can be aligned horizontally and vertically within a
draw area. Can also contain line breaks.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D.Fonts FontText
DeltaEngine.Rendering2D.Fonts FpsDisplay
Namespace: DeltaEngine.Rendering2D.Fonts
Assembly: DeltaEngine.Rendering2D.Fonts (in DeltaEngine.Rendering2D.Fonts.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The FontText type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FontText | Initializes a new instance of the FontText class | |
FontText(Font, String, Rectangle) | Initializes a new instance of the FontText class |
Methods
Extension Methods
Name | Description | |
---|---|---|
AffixToPhysics | (Defined by Entity2DPhysicsExtensions.) | |
StartBouncingOffScreenEdges | (Defined by Entity2DExtensions.) | |
StartFalling | (Defined by Entity2DExtensions.) | |
StartMoving | (Defined by Entity2DExtensions.) | |
StartRotating | (Defined by Entity2DExtensions.) |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
DefaultFontRenderLayer | ||
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
Alpha | (Inherited from Entity2D.) | |
Center | (Inherited from Entity2D.) | |
Color | (Inherited from Entity2D.) | |
DidFootprintChange | (Inherited from Entity2D.) | |
DrawArea | (Inherited from Entity2D.) | |
HorizontalAlignment | ||
IsActive | (Inherited from DrawableEntity.) | |
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
LastColor | (Inherited from Entity2D.) | |
LastDrawArea | (Inherited from Entity2D.) | |
NumberOfComponents | (Inherited from Entity.) | |
RenderLayer | (Inherited from DrawableEntity.) | |
Rotation | (Inherited from Entity2D.) | |
RotationCenter | (Inherited from Entity2D.) | |
Size | (Inherited from Entity2D.) | |
Text | ||
TopLeft | (Inherited from Entity2D.) | |
UpdatePriority | (Inherited from Entity.) | |
VerticalAlignment |
Remarks
Examples
[Test, ApproveFirstFrameScreenshot] public void TextShouldSayChangedText() { new FontText(tahoma, "To be changed", Rectangle.One) { Text = "Changed\nText" }; }
[Test, ApproveFirstFrameScreenshot] public void TextShouldBeInTheMiddleOfTheScreen() { new FontText(tahoma, "Middle", Rectangle.Zero) { DrawArea = Rectangle.One }; }
[Test, ApproveFirstFrameScreenshot] public void FontDefaultsToVerdana12() { new FontText(Font.Default, "Verdana12 font", Center); }
See Also