Menu ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  CreepyTowers.GUI Menu
    CreepyTowers.GUI AvatarSelectionMenu
    CreepyTowers.GUI Credits
    CreepyTowers.GUI FailScene
    CreepyTowers.GUI Hud
    CreepyTowers.GUI IntroScene
    CreepyTowers.GUI MainMenu
    CreepyTowers.GUI Nightmare1
    CreepyTowers.GUI PauseScene
    CreepyTowers.GUI SceneCinematics
    CreepyTowers.GUI Settings
    CreepyTowers.GUI SuccessScene
    CreepyTowers.GUI TowerSelectionPanel
    CreepyTowers.Tests.GUI MockMenuScene

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

public abstract class Menu : IDisposable

The Menu type exposes the following members.

Constructors

  NameDescription
Protected methodMenu
Initializes a new instance of the Menu class
Top
Methods

  NameDescription
Public methodDisable
Public methodDispose
Releases all resources used by the Menu
Public methodEnable
Public methodGetSceneControl
Public methodHide
Public methodReset
Public methodShow
Top
Properties

  NameDescription
Public propertyIsShown
Public propertyScene
Top
Remarks

Tests: CreepyTowers.Tests.GUI.MenuControllerTests
Examples

9 unit tests call CreepyTowers.GUI.Menu
[Test, CloseAfterFirstFrame]
public void CannotCreateMenuControllerWithoutDisposing()
{
    Assert.Throws<MenuController.MenuControllerAlreadyExists>(() => new MenuControllerSpy());
}
[Test, CloseAfterFirstFrame]
public void GetCachedMenu()
{
    Assert.AreEqual(0, spy.NumberOfCreatedMenus);
    var menu = MenuController.GetMenu<MockMenuScene>();
    Assert.AreEqual(1, spy.NumberOfCreatedMenus);
    Assert.AreEqual(menu, MenuController.GetMenu<MockMenuScene>());
    Assert.AreEqual(1, spy.NumberOfCreatedMenus);
}
[Test, CloseAfterFirstFrame]
public void ShowAndHideCachedMenu()
{
    var menu = MenuController.GetMenu<MockMenuScene>();
    Assert.IsFalse(menu.IsShown);
    MenuController.ShowMenu<MockMenuScene>();
    Assert.IsTrue(menu.IsShown);
    MenuController.HideMenu<MockMenuScene>();
    Assert.IsFalse(menu.IsShown);
}
See Also