The basis for most UI controls that can respond to mouse or touch input. Although it is a Sprite
it defaults to a transparent material as a Control. Can also be used as a container (e.g. Panel)
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D HierarchyEntity2D
DeltaEngine.Rendering2D Sprite
DeltaEngine.Scenes.Controls Control
DeltaEngine.Scenes.Controls Picture
DeltaEngine.Scenes.Controls RadioDialog
DeltaEngine.Scenes.Controls Tilemap
Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Control type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Control | Initializes a new instance of the Control class | |
Control(Rectangle) | Initializes a new instance of the Control class |
Methods
Extension Methods
Name | Description | |
---|---|---|
AffixToPhysics | (Defined by Entity2DPhysicsExtensions.) | |
StartBouncingOffScreenEdges | (Defined by Entity2DExtensions.) | |
StartFalling | (Defined by Entity2DExtensions.) | |
StartMoving | (Defined by Entity2DExtensions.) | |
StartMovingUV | (Defined by Entity2DExtensions.) | |
StartRotating | (Defined by Entity2DExtensions.) |
Fields
Name | Description | |
---|---|---|
Clicked | ||
components | (Inherited from Entity.) | |
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
Events
Name | Description | |
---|---|---|
AnimationEnded | (Inherited from Sprite.) |
Remarks
Examples
[Test] public void EachControlShouldHaveAnUniqueName() { var button1 = new Button(new Theme(), new Rectangle()); Assert.IsTrue(button1.Name.StartsWith("Button")); var button2 = new Button(new Theme(), new Rectangle()); Assert.IsTrue(button2.Name.StartsWith("Button")); Assert.AreNotEqual(button1.Name, button2.Name); var picture1 = new Picture(new Theme(), new Material(Color.Red, ShaderFlags.Position2DColored), new Rectangle()); Assert.IsTrue(picture1.Name.StartsWith("Picture")); }
See Also