Inheritance Hierarchy
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
The Menu type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Menu | Initializes a new instance of the Menu class |
Methods
Name | Description | |
---|---|---|
Disable | ||
Dispose | Releases all resources used by the Menu | |
Enable | ||
GetSceneControl | ||
Hide | ||
Reset | ||
Show |
Properties
Name | Description | |
---|---|---|
IsShown | ||
Scene |
Remarks
Examples
[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