Control ClassDelta Engine Documentation
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

System Object
  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)

public class Control : Sprite, Updateable

The Control type exposes the following members.


Protected methodControl 
Initializes a new instance of the Control class
Protected methodControl(Rectangle)
Initializes a new instance of the Control class

Public methodAdd(HierarchyObject2D) (Inherited from HierarchyEntity2D.)
Public methodAdd T (T) (Inherited from Sprite.)
Protected methodAddChild
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodClick
Public methodContains T  (Inherited from Entity2D.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T  (Inherited from Sprite.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Public methodGetComponentsForEditing (Inherited from Entity2D.)
Protected methodGetComponentsForSaving (Inherited from Sprite.)
Protected methodGetDrawBehaviors (Inherited from DrawableEntity.)
Public methodGetFirstChildOfType T  (Inherited from HierarchyEntity2D.)
Public methodGetInterpolatedArray T  (Inherited from DrawableEntity.)
Public methodGetInterpolatedList T  (Inherited from DrawableEntity.)
Public methodGetLevel
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Protected methodNextUpdateStarted (Inherited from Sprite.)
Public methodOnDraw T  (Inherited from DrawableEntity.)
Protected methodOnPositionChanged (Inherited from HierarchyEntity2D.)
Protected methodOnRotationChanged (Inherited from HierarchyEntity2D.)
Public methodRemove(HierarchyObject2D) (Inherited from HierarchyEntity2D.)
Public methodRemove T   (Inherited from Entity.)
Protected methodRemoveChild
Public methodRemoveTag (Inherited from Entity.)
Public methodReset (Inherited from Sprite.)
Public methodRotatedDrawAreaContains (Inherited from Entity2D.)
Public methodSet (Inherited from Sprite.)
Public methodSetComponents (Inherited from Entity.)
Public methodSetWithoutInterpolation T  (Inherited from Sprite.)
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToggleVisibility (Overrides DrawableEntity ToggleVisibility .)
Public methodToString (Inherited from Entity.)
Public methodUpdate
Public methodUpdateGlobalsFromParent (Inherited from HierarchyEntity2D.)
Extension Methods

Public Extension MethodAffixToPhysics (Defined by Entity2DPhysicsExtensions.)
Public Extension MethodStartBouncingOffScreenEdges (Defined by Entity2DExtensions.)
Public Extension MethodStartFalling (Defined by Entity2DExtensions.)
Public Extension MethodStartMoving (Defined by Entity2DExtensions.)
Public Extension MethodStartMovingUV (Defined by Entity2DExtensions.)
Public Extension MethodStartRotating (Defined by Entity2DExtensions.)

Public fieldClicked
Protected fieldcomponents (Inherited from Entity.)
Protected fieldlastTickLerpComponents
Each element can either be a Lerp, a Lerp List or an array of Lerp objects. View code on GitHub
(Inherited from DrawableEntity.)

Public propertyAlpha (Inherited from Entity2D.)
Public propertyBlendMode (Inherited from Sprite.)
Public propertyBottomMargin
Public propertyCenter (Inherited from Entity2D.)
Public propertyChildren (Inherited from HierarchyEntity2D.)
Public propertyColor (Inherited from Entity2D.)
Public propertyCurrentFrame (Inherited from Sprite.)
Public propertyDidFootprintChange (Inherited from Entity2D.)
Public propertyDrawArea (Inherited from Entity2D.)
Public propertyElapsed (Inherited from Sprite.)
Public propertyFlipMode (Inherited from Sprite.)
Public propertyIsActive (Overrides HierarchyEntity2D IsActive.)
Public propertyIsEnabled
Public propertyIsPauseable (Overrides Entity IsPauseable.)
Public propertyIsPlaying (Inherited from Sprite.)
Public propertyIsVisible (Inherited from DrawableEntity.)
Public propertyLastColor (Inherited from Entity2D.)
Public propertyLastDrawArea (Inherited from Entity2D.)
Public propertyLastUV (Inherited from Sprite.)
Public propertyLeftMargin
Public propertyMaterial (Inherited from Sprite.)
Public propertyName
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyParent (Inherited from HierarchyEntity2D.)
Public propertyRelativePosition (Inherited from HierarchyEntity2D.)
Public propertyRelativeRotation (Inherited from HierarchyEntity2D.)
Public propertyRenderLayer (Inherited from DrawableEntity.)
Public propertyRightMargin
Public propertyRotation (Inherited from Entity2D.)
Public propertyRotationCenter (Inherited from Entity2D.)
Public propertySize (Inherited from Entity2D.)
Public propertyState
Public propertyTopLeft (Inherited from Entity2D.)
Public propertyTopMargin
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyUV (Inherited from Sprite.)

Public eventAnimationEnded (Inherited from Sprite.)

Tests: DeltaEngine.Scenes.Tests.Controls.ControlTests

1 unit tests call DeltaEngine.Scenes.Controls.Control
public void EachControlShouldHaveAnUniqueName()
    var button1 = new Button(new Theme(), new Rectangle());
    var button2 = new Button(new Theme(), new Rectangle());
    Assert.AreNotEqual(button1.Name, button2.Name);
    var picture1 = new Picture(new Theme(),
        new Material(Color.Red, ShaderFlags.Position2DColored), new Rectangle());
See Also