コード例 #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;
        }
コード例 #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();
                }
            }
        }
コード例 #3
0
ファイル: StateManager.cs プロジェクト: melari/monopole
 /// <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;
 }
コード例 #4
0
ファイル: StateManager.cs プロジェクト: melari/monopole
 /// <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();
     }
 }