コード例 #1
0
ファイル: UIController.cs プロジェクト: chatrat12/Prism
 static UIController()
 {
     _userInterface = new UserInterface();
     _state = new UIState();
     _userInterface.SetState(_state);
     TooltipText = string.Empty;
     TooltipItem = new Item();
 }
コード例 #2
0
 public void SetState(UIState state)
 {
     AddToHistory(state);
     if (_currentState != null)
     {
         _currentState.Deactivate();
     }
     _currentState = state;
     ResetState();
     if (state != null)
     {
         state.Activate();
         state.Recalculate();
     }
 }
コード例 #3
0
 public void SetState(UIState state)
 {
     this.AddToHistory(state);
     if (this._currentState != null)
     {
         this._currentState.Deactivate();
     }
     this._currentState = state;
     this.ResetState();
     if (state == null)
     {
         return;
     }
     state.Activate();
     state.Recalculate();
 }
コード例 #4
0
 public void SetState(UIState state)
 {
     if (state != null)
     {
         AddToHistory(state);
     }
     if (_currentState != null)
     {
         if (_lastElementHover != null)
         {
             _lastElementHover.MouseOut(new UIMouseEvent(_lastElementHover, MousePosition));
         }
         _currentState.Deactivate();
     }
     _currentState = state;
     ResetState();
     if (state != null)
     {
         _isStateDirty = true;
         state.Activate();
         state.Recalculate();
     }
 }
コード例 #5
0
 public void SetState(UIState state)
 {
     if (state != null)
     {
         this.AddToHistory(state);
     }
     if (this._currentState != null)
     {
         if (this._lastElementHover != null)
         {
             this._lastElementHover.MouseOut(new UIMouseEvent(this._lastElementHover, this.MousePosition));
         }
         this._currentState.Deactivate();
     }
     this._currentState = state;
     this.ResetState();
     if (state == null)
     {
         return;
     }
     this._isStateDirty = true;
     state.Activate();
     state.Recalculate();
 }
コード例 #6
0
 public void DrawDebugHitbox(BasicDebugDrawer drawer)
 {
     UIState currentState = this._currentState;
 }
コード例 #7
0
		private void AddToHistory(UIState state)
		{
			this._history.Add(state);
			if (this._history.Count > 32)
			{
				this._history.RemoveRange(0, 4);
			}
		}
コード例 #8
0
		public void SetState(UIState state)
		{
			this.AddToHistory(state);
			if (this._currentState != null)
			{
				this._currentState.Deactivate();
			}
			this._currentState = state;
			this.ResetState();
			if (state != null)
			{
				state.Activate();
				state.Recalculate();
			}
		}