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(); }
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(); }); }