Esempio n. 1
0
        /// <summary>
        /// Removes the given state and removes all instances of it from the focus stack.
        /// </summary>
        /// <param name="state"></param>
        public void EndState(State state)
        {
            states.RemoveBuffer.Add(state);
            State cur = GetFocusedState();

            focusState.RemoveAll(i => i == state);
            if (GetFocusedState() != cur && GetFocusedState() != null)
            {
                state.OnBlur();
                GetFocusedState().OnFocus();
            }
            toSort = true;
        }
Esempio n. 2
0
        /// <summary>
        /// Removes the given state from the focus stack.
        /// </summary>
        public void DropFocus(State state)
        {
            State cur = GetFocusedState();

            focusState.Remove(state);
            if (GetFocusedState() != cur && GetFocusedState() != null)
            {
                state.OnBlur();
                if (focusState.Count > 0)
                {
                    GetFocusedState().OnFocus();
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Removes the given state and removes all instances of it from the focus stack.
 /// </summary>
 /// <param name="state"></param>
 public void EndState(State state)
 {
     states.RemoveBuffer.Add(state);
     State cur = GetFocusedState();
     focusState.RemoveAll(i => i == state);
     if (GetFocusedState() != cur && GetFocusedState() != null)
     {
         state.OnBlur();
         GetFocusedState().OnFocus();
     }
     toSort = true;
 }
Esempio n. 4
0
 /// <summary>
 /// Removes the given state from the focus stack.
 /// </summary>
 public void DropFocus(State state)
 {
     State cur = GetFocusedState();
     focusState.Remove(state);
     if (GetFocusedState() != cur && GetFocusedState() != null)
     {
         state.OnBlur();
         if (focusState.Count > 0)
             GetFocusedState().OnFocus();
     }
 }