MainMenu ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Content ContentData
    DeltaEngine.Scenes Scene
      Breakout MainMenu

Namespace: Breakout
Assembly: Breakout (in Breakout.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public class MainMenu : Scene

The MainMenu type exposes the following members.

Constructors

  NameDescription
Public methodMainMenu
Initializes a new instance of the MainMenu class
Top
Methods

  NameDescription
Public methodAdd(Entity2D) (Inherited from Scene.)
Public methodAdd(IEnumerable Entity2D ) (Inherited from Scene.)
Public methodAddControlToScene (Inherited from Scene.)
Public methodClear (Inherited from Scene.)
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 propertyBackSound
Public propertyControls (Inherited from Scene.)
Public propertyDrawArea (Inherited from Scene.)
Public propertyEnterSound
Public propertyIsDisposed (Inherited from ContentData.)
Public propertyMetaData (Inherited from ContentData.)
Public propertyName (Inherited from ContentData.)
Top
Events

  NameDescription
Public eventInitGame
Public eventQuitGame
Public eventStatic memberSettingsChanged
Top
Remarks

Tests: Breakout.Tests.MainMenuTests
Examples

4 unit tests call Breakout.MainMenu
[Test]
public void StartGame()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    bool started = false;
    menu.InitGame += () => started = true;
    var mouse = Resolve<MockMouse>();
    ClickAtPosition(mouse, new Vector2D(0.31f, 0.31f));
    Assert.IsTrue(started);
}
[Test]
public void QuitGame()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    bool quit = false;
    menu.QuitGame += () => quit = true;
    var mouse = Resolve<MockMouse>();
    ClickAtPosition(mouse, new Vector2D(0.31f, 0.73f));
    Assert.IsTrue(quit);
}
[Test, Ignore]
public void HowToPlay()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    var mouse = Resolve<MockMouse>();
    ClickAtPosition(mouse, new Vector2D(0.31f, 0.45f));
    Assert.IsFalse(menu.Controls[0].IsVisible);
    ClickAtPosition(mouse, new Vector2D(0.31f, ScreenSpace.Current.Bottom - 0.19f));
    Assert.IsTrue(menu.Controls[0].IsVisible);
}
See Also