AutoArrangingMenu ClassDelta Engine Documentation
A simple menu system where all buttons are the same size and auto-arrange on screen. When any control is added to the scene it will also autoassign the renderlayer. This applies to all controls, not just menu buttons. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Content ContentData
    DeltaEngine.Scenes Scene
      DeltaEngine.Scenes AutoArrangingMenu
        DeltaEngine.Scenes.Tests AutoArrangingMenuTests MenuXml

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

public class AutoArrangingMenu : Scene

The AutoArrangingMenu type exposes the following members.

Constructors

  NameDescription
Protected methodAutoArrangingMenu(String)
Initializes a new instance of the AutoArrangingMenu class
Public methodAutoArrangingMenu(Size, Int32)
Initializes a new instance of the AutoArrangingMenu class
Top
Methods

  NameDescription
Public methodAdd(Entity2D) (Overrides Scene Add(Entity2D).)
Public methodAdd(IEnumerable Entity2D ) (Inherited from Scene.)
Public methodAddControlToScene (Inherited from Scene.)
Public methodAddMenuOption(Action, String)
Public methodAddMenuOption(Theme, Action, String)
Public methodClear (Overrides Scene Clear .)
Public methodClearMenuOptions
Protected methodCreateDefault (Inherited from ContentData.)
Public methodDispose (Inherited from ContentData.)
Protected methodDisposeData (Inherited from Scene.)
Public methodHide (Inherited from Scene.)
Public methodInternalCreateDefault (Inherited from ContentData.)
Protected methodLoadData (Inherited from Scene.)
Public methodLoadFromFile (Inherited from Scene.)
Public methodRemove (Inherited from Scene.)
Public methodSetQuadraticBackground(String) (Inherited from Scene.)
Public methodSetQuadraticBackground(Material) (Inherited from Scene.)
Public methodSetViewportBackground(String) (Inherited from Scene.)
Public methodSetViewportBackground(Material) (Inherited from Scene.)
Public methodShow (Inherited from Scene.)
Public methodToBackground (Inherited from Scene.)
Public methodToForeground (Inherited from Scene.)
Public methodToString (Inherited from ContentData.)
Top
Fields

  NameDescription
Protected fieldbackground (Inherited from Scene.)
Protected fieldContentChanged (Inherited from ContentData.)
Top
Properties

  NameDescription
Protected propertyAllowCreationIfContentNotFound (Inherited from ContentData.)
Public propertyButtonSize
Public propertyCenter
Public propertyControls (Inherited from Scene.)
Public propertyDrawArea (Inherited from Scene.)
Public propertyIsDisposed (Inherited from ContentData.)
Public propertyMetaData (Inherited from ContentData.)
Public propertyName (Inherited from ContentData.)
Public propertyRenderLayer
Top
Remarks

Tests: DeltaEngine.Scenes.Tests.AutoArrangingMenuTests
Examples

14 unit tests call DeltaEngine.Scenes.AutoArrangingMenu
[Test]
public void CreateNewMenuWithContentName()
{
    AutoArrangingMenu menuByName = ContentLoader.Load<MenuXml>("TestMenuXml");
    Assert.AreEqual(menuByName.Name, "TestMenuXml");
}
[Test, ApproveFirstFrameScreenshot]
public void ShowMenuWithTwoButtons()
{
    menu.AddMenuOption(() => { text.Text = "Clicked Top Button"; });
[Test]
public void ShowMenuWithThreeButtons()
{
    menu.AddMenuOption(() => { text.Text = "Clicked Top Button"; });
See Also