Example #1
0
 public void SetState(UIState state)
 {
     if (state == _currentState)
     {
         return;
     }
     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();
     }
 }
Example #2
0
 internal void RefreshState()
 {
     if (_currentState != null)
     {
         _currentState.Deactivate();
     }
     ResetState();
     _currentState.Activate();
     _currentState.Recalculate();
 }
 public void SetState(UIState state)
 {
     AddToHistory(state);
     if (_currentState != null)
     {
         _currentState.Deactivate();
     }
     _currentState = state;
     ResetState();
     if (state != null)
     {
         state.Activate();
         state.Recalculate();
     }
 }
Example #4
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();
 }
		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();
			}
		}