AutoArrangingMenu Add Method (Entity2D)Delta Engine Documentation

Namespace: DeltaEngine.Scenes
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override void Add(
	Entity2D control
)
Remarks

Tests: DeltaEngine.Scenes.Tests.AutoArrangingMenuTests
Examples

2 unit tests call DeltaEngine.Scenes.AutoArrangingMenu.Add(DeltaEngine.Rendering2D.Entity2D)
[Test, CloseAfterFirstFrame]
public void AddingMenuOptionAddsButton()
{
    menu.Center = new Vector2D(0.6f, 0.6f);
    menu.AddMenuOption(() => { });
[Test, CloseAfterFirstFrame]
public void AddControlContentTwice()
{
    var control = new TestControl();
    control.IsActive = false;
    Assert.AreEqual(false, control.IsActive);
    control.IsActive = true;
    Assert.AreEqual(false, control.IsActive);
}
See Also