Пример #1
0
    protected override void OnViewHide()
    {
        RegisterButtonDelegate(CLOSE_BUTTON, null, null);

        GuiMenu menu = Owner as GuiMenu;

        if (menu != null)
        {
            menu.SetOverlaysEnabled(true);
            menu.SetBackgroundVisibility(true);
        }

        base.OnViewHide();
    }
Пример #2
0
    protected override void OnViewShow()
    {
        base.OnViewShow();

        GuiMenu menu = Owner as GuiMenu;

        if (menu != null)
        {
            menu.SetOverlaysEnabled(false);
            menu.SetBackgroundVisibility(false);
        }

        RegisterButtonDelegate(CLOSE_BUTTON, null, (inside) => { Owner.Back(); });
    }