Menu IsShown Property Delta Engine Documentation

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

public bool IsShown { get; protected set; }

Property Value

Type: Boolean
Remarks

Tests: CreepyTowers.Tests.GUI.MenuControllerTests
Examples

3 unit tests call CreepyTowers.GUI.Menu.IsShown
[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);
}
[Test, CloseAfterFirstFrame]
public void HideAllCachedMenus()
{
    var menu = MenuController.GetMenu<MockMenuScene>();
    menu.Show();
    Assert.IsTrue(menu.IsShown);
    MenuController.HideAllMenus();
    Assert.IsFalse(menu.IsShown);
}
[Test, CloseAfterFirstFrame]
public void HideAllVisibleMenus()
{
    var menu = MenuController.GetMenu<MockMenuScene>();
    menu.Show();
    Assert.IsTrue(menu.IsShown);
    MenuController.HideAllVisibleMenus();
    Assert.IsFalse(menu.IsShown);
}
See Also