Allows one value to be selected from a dropdown list of values
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 Label
DeltaEngine.Scenes.Controls DropdownList
Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The DropdownList type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | DropdownList | Initializes a new instance of the DropdownList class |
![]() | DropdownList(Rectangle, List Object ) | Initializes a new instance of the DropdownList class |
![]() | DropdownList(Theme, Rectangle, List Object ) | Initializes a new instance of the DropdownList 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 | (Inherited from Control.) |
![]() | 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
Name | Description | |
---|---|---|
![]() | Alpha | (Inherited from Entity2D.) |
![]() | BlendMode | (Inherited from Sprite.) |
![]() | BottomMargin | (Inherited from Control.) |
![]() | Center | (Inherited from Entity2D.) |
![]() | Children | (Inherited from HierarchyEntity2D.) |
![]() | Color | (Inherited from Entity2D.) |
![]() | CurrentFrame | (Inherited from Sprite.) |
![]() | DidFootprintChange | (Inherited from Entity2D.) |
![]() | DrawArea | (Inherited from Entity2D.) |
![]() | Elapsed | (Inherited from Sprite.) |
![]() | FlipMode | (Inherited from Sprite.) |
![]() | FontText | (Inherited from Label.) |
![]() | IsActive | (Inherited from Control.) |
![]() | IsEnabled | (Overrides Control IsEnabled.) |
![]() | IsPauseable | (Inherited from Control.) |
![]() | IsPlaying | (Inherited from Sprite.) |
![]() | IsVisible | (Inherited from DrawableEntity.) |
![]() | LastColor | (Inherited from Entity2D.) |
![]() | LastDrawArea | (Inherited from Entity2D.) |
![]() | LastUV | (Inherited from Sprite.) |
![]() | LeftMargin | (Inherited from Control.) |
![]() | Material | (Inherited from Sprite.) |
![]() | MaxDisplayCount | |
![]() | Name | (Inherited from Control.) |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | Parent | (Inherited from HierarchyEntity2D.) |
![]() | PreviousText | (Inherited from Label.) |
![]() | RelativePosition | (Inherited from HierarchyEntity2D.) |
![]() | RelativeRotation | (Inherited from HierarchyEntity2D.) |
![]() | RenderLayer | (Inherited from DrawableEntity.) |
![]() | RightMargin | (Inherited from Control.) |
![]() | Rotation | (Inherited from Entity2D.) |
![]() | RotationCenter | (Inherited from Entity2D.) |
![]() | SelectedValue | |
![]() | Size | (Inherited from Entity2D.) |
![]() | State | (Inherited from Control.) |
![]() | Text | (Inherited from Label.) |
![]() | Theme | (Inherited from Picture.) |
![]() | TopLeft | (Inherited from Entity2D.) |
![]() | TopMargin | (Inherited from Control.) |
![]() | UpdatePriority | (Inherited from Entity.) |
![]() | UV | (Inherited from Sprite.) |
![]() | Values |
Events
Name | Description | |
---|---|---|
![]() | AnimationEnded | (Inherited from Sprite.) |
Remarks
Examples
[Test] public void RenderDropdownListWithTenValues() { SetToTenValues(); }
[Test, CloseAfterFirstFrame] public void DefaultProperties() { Assert.AreEqual(Values, dropdownList.Values); Assert.AreEqual(Values[0], dropdownList.SelectedValue); Assert.AreEqual(Center, dropdownList.DrawArea); Assert.AreEqual(Color.Gray, dropdownList.Color); Assert.AreEqual(3, dropdownList.SelectBox.texts.Count); Assert.IsFalse(dropdownList.IsPauseable); Assert.AreEqual(3, dropdownList.MaxDisplayCount); }
[Test, CloseAfterFirstFrame] public void NoValuesThrowsException() { Assert.Throws<SelectBox.MustBeAtLeastOneValue>(() => new DropdownList(Rectangle.Zero, null)); Assert.Throws<SelectBox.MustBeAtLeastOneValue>( () => new DropdownList(Rectangle.Zero, new List<object>())); }
See Also