AutoArrangingMenu Center Property Delta Engine Documentation

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

public Vector2D Center { get; set; }

Property Value

Type: Vector2D
Remarks

Tests: DeltaEngine.Scenes.Tests.AutoArrangingMenuTests
Examples

2 unit tests call DeltaEngine.Scenes.AutoArrangingMenu.Center
[Test, CloseAfterFirstFrame]
public void CreatingSetsButtonSizeAndMenuCenter()
{
    Assert.AreEqual(ButtonSize, menu.ButtonSize);
    Assert.AreEqual(Vector2D.Half, menu.Center);
}
[Test, CloseAfterFirstFrame]
public void ChangingCenterForSetOfButtons()
{
    menu.Center = Vector2D.One;
    Assert.AreEqual(Vector2D.One, menu.Center);
}
See Also