Example #1
0
        public void RemoveStatusNode(StatusEffectNodeScript statusEffectNodeScript)
        {
            //Debug.Log(gameObject.name + ".StatusEffectWindowPanel.RemoveStatusNode()");
            uINavigationControllers[0].ClearActiveButton(statusEffectNodeScript);

            if (uINavigationControllers[0].ActiveNavigableButtonCount == 0)
            {
                uIManager.RemoveNavigableInterfaceElement(this);
            }

            // only process active element code if actively browsing this panel
            // status effects can be removed when not browsing this window
            // check if this window is actively browsed, and if so, navigate to the next one instead
            if (windowManager.CurrentWindow != null && windowManager.CurrentWindow == this)
            {
                if (uINavigationControllers[0].ActiveNavigableButtonCount > 0)
                {
                    uINavigationControllers[0].FocusCurrentButton();
                }
                else
                {
                    //if (windowManager.CurrentWindow == this) {
                    windowManager.RemoveWindow(this);
                    UnFocus();
                    windowManager.NavigateInterface();
                    //}
                }
            }
        }
Example #2
0
 public void AddStatusNode(StatusEffectNodeScript statusEffectNodeScript)
 {
     //Debug.Log(gameObject.name + ".StatusEffectWindowPanel.AddStatusNode()");
     if (uINavigationControllers[0].ActiveNavigableButtonCount == 0)
     {
         uIManager.AddNavigableInterfaceElement(this);
     }
     uINavigationControllers[0].AddActiveButton(statusEffectNodeScript);
 }
        public override StatusEffectNodeScript ClearStatusEffectNode(StatusEffectNode statusEffectNode)
        {
            //Debug.Log(gameObject.name + ".MainStatusEffectPanelController.ClearStatusEffectNode()");
            StatusEffectNodeScript returnValue = base.ClearStatusEffectNode(statusEffectNode);

            if (returnValue != null && statusEffectWindowPanel != null)
            {
                statusEffectWindowPanel.RemoveStatusNode(returnValue);
            }

            return(returnValue);
        }