idTech4.UI.idUserInterface.StateChanged C# (CSharp) Method

StateChanged() public method

public StateChanged ( int time, bool redraw = false ) : void
time int
redraw bool
return void
		public void StateChanged(int time, bool redraw = false)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			_time = time;

			if(this.Desktop != null)
			{
				this.Desktop.StateChanged(redraw);
			}

			if(this.State.GetBool("noninteractive") == true)
			{
				_interactive = false;
			}
			else
			{
				if(this.Desktop != null)
				{
					_interactive = this.Desktop.IsInteractive;
				}
				else
				{
					_interactive = false;
				}
			}
		}

Usage Example

示例#1
0
		private void UpdateGuiParams(idUserInterface gui, idDict args)
		{
			if((gui == null) || (args == null))
			{
				return;
			}

			foreach(KeyValuePair<string, string> kvp in args.MatchPrefix("gui_parm"))
			{
				gui.State.Set(kvp.Key, kvp.Value);
			}

			gui.State.Set("noninteractive", args.GetBool("gui_noninteractive"));
			gui.StateChanged(idR.Game.Time);
		}