Displays a console consisting of a command line, a number of history lines above it, and
autocompletion information below it.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D.Shapes Polygon2D
DeltaEngine.Rendering2D.Shapes FilledRect
DeltaEngine.Scenes.Terminal Console
Namespace: DeltaEngine.Scenes.Terminal
Assembly: DeltaEngine.Scenes.Terminal (in DeltaEngine.Scenes.Terminal.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Console type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Console | Initializes a new instance of the Console 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.) | |
FontPixelSize | ||
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 Polygon2D.) | |
IsActive | (Overrides DrawableEntity IsActive.) | |
IsEnabled | ||
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
LastColor | (Inherited from Entity2D.) | |
LastDrawArea | (Inherited from Entity2D.) | |
NumberOfComponents | (Inherited from Entity.) | |
Points | (Inherited from Polygon2D.) | |
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.) |
Remarks
Examples
[Test] public void CreateConsole() { if (!IsMockResolver) return; //ncrunch: no coverage Assert.AreEqual(0.01f, console.DrawArea.Left); Assert.AreEqual(0.1f, console.DrawArea.Top); Assert.AreEqual(0.99f, console.DrawArea.Right); Assert.AreEqual(0.98f, console.DrawArea.Width); Assert.AreEqual(0.352f, console.DrawArea.Bottom); Assert.IsTrue(console.IsEnabled); Assert.AreEqual(Console.EnabledBackgroundColor, console.Color); }
[Test, CloseAfterFirstFrame] public void TypingGoesIntoTheCommandLine() { if (keyboard == null) return; //ncrunch: no coverage PressKeys(new List<Key> { Key.A, Key.B, Key.C });
[Test, CloseAfterFirstFrame] public void PressingEnterExecutesCommandTrimsItAndMovesItToHistory() { if (keyboard == null) return; //ncrunch: no coverage PressKeys(new List<Key> { Key.A, Key.Space, Key.Space, Key.B, Key.Enter });
See Also