FRBDK/ParticleEditor/GUI/PropertyWindowMessages.cs
/// <summary>
/// Creates the value windows depending on the instruction type.
/// </summary>
/// <remarks>
/// This method needs to be changed when adding new FrbInstruction types
/// </remarks>
Creates the value windows depending on the instruction type.
Creates the value windows depending on the instruction type .
static void ShowInstructionGUI()
		{
			string instructionType = "";
			if(guiData.propWindow.instructionListBox.GetHighlighted().Count != 0)
				instructionType = guiData.propWindow.instructionListBox.GetHighlighted()[0];
			guiData.propWindow.typeTextDisplay.visible = true;
			guiData.propWindow.typeComboBox.visible = true;
			#region No Instruction Type Selected
			if(instructionType == "No Instruction Type Selected")
			{
				CreateValueWindow(0, "null", "null");
				CreateValueWindow(1, "null", "null");
				CreateValueWindow(2, "null", "null");
			}
				#endregion
			#region FadeRate
			else if(instructionType == "FadeRate")
			{
				guiData.propWindow.instructionTimeTextDisplay.visible = true;
				guiData.propWindow.instructionTimeTextBox.visible = true;
				CreateValueWindow(0, "FadeRate", "UpDownWindow");
				((UpDown)propWindow.value1Window).onGUIChange += new FrbGuiMessage(SetValueGUIFadeRate);
				((UpDown)propWindow.value1Window).CurrentValue = 
					(propWindow.instructionListBox.GetHighlightedObject() as FadeRate).fadeRate;
				CreateValueWindow(1, "null", "null");
				CreateValueWindow(2, "null", "null");				
			}
			#endregion
				#region XAcceleration
			else if(instructionType == "XAcceleration")
			{
				guiData.propWindow.instructionTimeTextDisplay.visible = true;
				guiData.propWindow.instructionTimeTextBox.visible = true;
				CreateValueWindow(0, "XAcceleration", "UpDownWindow");
				((UpDown)propWindow.value1Window).onGUIChange += new FrbGuiMessage(SetValueGUIXAcceleration);
				((UpDown)propWindow.value1Window).CurrentValue = 
					(propWindow.instructionListBox.GetHighlightedObject() as XAcceleration).xAcceleration;
				CreateValueWindow(1, "null", "null");
				CreateValueWindow(2, "null", "null");				
			}
				#endregion
				#region YAcceleration
			else if(instructionType == "YAcceleration")
			{
				guiData.propWindow.instructionTimeTextDisplay.visible = true;
				guiData.propWindow.instructionTimeTextBox.visible = true;
				CreateValueWindow(0, "YAcceleration", "UpDownWindow");
				((UpDown)propWindow.value1Window).onGUIChange += new FrbGuiMessage(SetValueGUIYAcceleration);
				((UpDown)propWindow.value1Window).CurrentValue = 
					(propWindow.instructionListBox.GetHighlightedObject() as YAcceleration).yAcceleration;
				CreateValueWindow(1, "null", "null");
				CreateValueWindow(2, "null", "null");				
			}
				#endregion
				#region ZAcceleration
			else if(instructionType == "ZAcceleration")
			{
				guiData.propWindow.instructionTimeTextDisplay.visible = true;
				guiData.propWindow.instructionTimeTextBox.visible = true;
				CreateValueWindow(0, "ZAcceleration", "UpDownWindow");
				((UpDown)propWindow.value1Window).onGUIChange += new FrbGuiMessage(SetValueGUIZAcceleration);
				((UpDown)propWindow.value1Window).CurrentValue = 
					(propWindow.instructionListBox.GetHighlightedObject() as ZAcceleration).zAcceleration;
				CreateValueWindow(1, "null", "null");
				CreateValueWindow(2, "null", "null");				
			}
			#endregion
			if(propWindow.instructionListBox.GetHighlighted().Count != 0)
				propWindow.instructionTimeTextBox.text = (propWindow.instructionListBox.GetHighlightedObject() as FrbInstruction).timeToExecute.ToString();
		}
static void ShowInstructionGUI ( ) { string instructionType = " " ; if ( guiData . propWindow . instructionListBox . GetHighlighted ( ) . Count != 0 ) instructionType = guiData . propWindow . instructionListBox . GetHighlighted ( ) [ 0 ] ; guiData . propWindow . typeTextDisplay . visible = true ; guiData . propWindow . typeComboBox . visible = true ; region  No Instruction Type Selected if ( instructionType == " " ) { CreateValueWindow ( 0 , " " , " " ) ; CreateValueWindow ( 1 , " " , " " ) ; CreateValueWindow ( 2 , " " , " " ) ; } endregion region  FadeRate else if ( instructionType == " " ) { guiData . propWindow . instructionTimeTextDisplay . visible = true ; guiData . propWindow . instructionTimeTextBox . visible = true ; CreateValueWindow ( 0 , " " , " " ) ; ( ( UpDown ) propWindow . value1Window ) . onGUIChange += new FrbGuiMessage ( SetValueGUIFadeRate ) ; ( ( UpDown ) propWindow . value1Window ) . CurrentValue = ( propWindow . instructionListBox . GetHighlightedObject ( ) as FadeRate ) . fadeRate ; CreateValueWindow ( 1 , " " , " " ) ; CreateValueWindow ( 2 , " " , " " ) ; } endregion region  XAcceleration else if ( instructionType == " " ) { guiData . propWindow . instructionTimeTextDisplay . visible = true ; guiData . propWindow . instructionTimeTextBox . visible = true ; CreateValueWindow ( 0 , " " , " " ) ; ( ( UpDown ) propWindow . value1Window ) . onGUIChange += new FrbGuiMessage ( SetValueGUIXAcceleration ) ; ( ( UpDown ) propWindow . value1Window ) . CurrentValue = ( propWindow . instructionListBox . GetHighlightedObject ( ) as XAcceleration ) . xAcceleration ; CreateValueWindow ( 1 , " " , " " ) ; CreateValueWindow ( 2 , " " , " " ) ; } endregion region  YAcceleration else if ( instructionType == " " ) { guiData . propWindow . instructionTimeTextDisplay . visible = true ; guiData . propWindow . instructionTimeTextBox . visible = true ; CreateValueWindow ( 0 , " " , " " ) ; ( ( UpDown ) propWindow . value1Window ) . onGUIChange += new FrbGuiMessage ( SetValueGUIYAcceleration ) ; ( ( UpDown ) propWindow . value1Window ) . CurrentValue = ( propWindow . instructionListBox . GetHighlightedObject ( ) as YAcceleration ) . yAcceleration ; CreateValueWindow ( 1 , " " , " " ) ; CreateValueWindow ( 2 , " " , " " ) ; } endregion region  ZAcceleration else if ( instructionType == " " ) { guiData . propWindow . instructionTimeTextDisplay . visible = true ; guiData . propWindow . instructionTimeTextBox . visible = true ; CreateValueWindow ( 0 , " " , " " ) ; ( ( UpDown ) propWindow . value1Window ) . onGUIChange += new FrbGuiMessage ( SetValueGUIZAcceleration ) ; ( ( UpDown ) propWindow . value1Window ) . CurrentValue = ( propWindow . instructionListBox . GetHighlightedObject ( ) as ZAcceleration ) . zAcceleration ; CreateValueWindow ( 1 , " " , " " ) ; CreateValueWindow ( 2 , " " , " " ) ; } endregion if ( propWindow . instructionListBox . GetHighlighted ( ) . Count != 0 ) propWindow . instructionTimeTextBox . text = ( propWindow . instructionListBox . GetHighlightedObject ( ) as FrbInstruction ) . timeToExecute . ToString ( ) ; }
Creates the value windows depending on the instruction type.
Creates the value windows depending on the instruction type .
remarks
This method needs to be changed when adding new FrbInstruction types
This method needs to be changed when adding new FrbInstruction types