Ejemplo n.º 1
0
        private void SetupControls()
        {
            SelectMenu technique = TrayManager.CreateThickSelectMenu(TrayLocation.TopLeft, "TechniqueType",
                                                                     "Instancing Technique", 200, 3);

            technique.AddItem("Instancing");
            technique.AddItem("Static Geometry");
            technique.AddItem("Independent Entities");

            SelectMenu objectType = TrayManager.CreateThickSelectMenu(TrayLocation.TopLeft, "ObjectType", "Object : ", 200, 4);

            objectType.AddItem("razor");
            objectType.AddItem("knot");
            objectType.AddItem("tudorhouse");
            objectType.AddItem("woodpallet");

            TrayManager.CreateThickSlider(TrayLocation.TopLeft, "ObjectCountSlider", "Object count", 200, 50, 0, 1000, 101).
            SetValue(160, false);

            TrayManager.CreateThickSlider(TrayLocation.TopLeft, "CPUOccupationSlider", "CPU Load (ms)", 200, 75, 0, 1000.0f / 60,
                                          20);

            TrayManager.CreateCheckBox(TrayLocation.TopLeft, "ShadowCheckBox", "Shadows", 200);

            TrayManager.CreateCheckBox(TrayLocation.TopLeft, "PostEffectCheckBox", "Post Effect", 200);

            TrayManager.ShowCursor();
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        protected void SetupGUI()
        {
            SelectMenu selectMenu = TrayManager.CreateLongSelectMenu(TrayLocation.TopLeft, "MaterialSelectMenu", "Material", 300,
                                                                     200, 5);

            for (int i = 0; i < this.materialControlsContainer.Count; i++)
            {
                selectMenu.AddItem(this.materialControlsContainer[i].DisplayName);
            }
            selectMenu.SelectedIndexChanged += selectMenu_SelectedIndexChanged;
            CheckBox box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "SpinLightButton", "Spin Light", 175);

            box.IsChecked     = true;
            box.CheckChanged += new CheckChangedHandler(box_CheckChanged);
            Button btn = TrayManager.CreateButton(TrayLocation.TopRight, "PageButtonControl", "Page", 175);

            btn.CursorPressed += new CursorPressedHandler(btn_CursorPressed);
            for (int i = 0; i < ControlsPerPage; i++)
            {
                this.shaderControls[i] = TrayManager.CreateThickSlider(TrayLocation.TopRight, "ShaderControlSlider" + i,
                                                                       "Control",
                                                                       256, 80, 0, 1, 100);
            }

            selectMenu.SelectItem(0);
            TrayManager.ShowCursor();
        }
Ejemplo n.º 3
0
		/// <summary>
		/// 
		/// </summary>
		private void SetupControls()
		{
			TrayManager.ShowCursor();

			// make room for the controls
			TrayManager.ShowLogo( TrayLocation.TopRight );
			TrayManager.ShowFrameStats( TrayLocation.TopRight );
			TrayManager.ToggleAdvancedFrameStats();

			infoLabel = TrayManager.CreateLabel( TrayLocation.Top, "TInfo", "", 350 );

			editMenu = TrayManager.CreateLongSelectMenu( TrayLocation.Bottom, "EditMode", "Edit Mode", 370, 250, 3 );
			editMenu.AddItem( "None" );
			editMenu.AddItem( "Elevation" );
			editMenu.AddItem( "Blend" );
			editMenu.SelectItem( 0 ); // no edit mode

			flyBox = TrayManager.CreateCheckBox( TrayLocation.Bottom, "Fly", "Fly" );
			flyBox.SetChecked( false, false );

			shadowsMenu = TrayManager.CreateLongSelectMenu( TrayLocation.Bottom, "Shadows", "Shadows", 370, 250, 3 );
			shadowsMenu.AddItem( "None" );
			shadowsMenu.AddItem( "Color Shadows" );
			shadowsMenu.AddItem( "Depth Shadows" );
			shadowsMenu.SelectItem( 0 );

			IList<string> names = new List<string>();
			names.Add("Help");
			//a friendly reminder
			TrayManager.CreateParamsPanel( TrayLocation.TopLeft, "Help", 100, names ).SetParamValue( 0, "H/F1" );
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Creates and initializes all the scene's GUI elements not defined in SdkSample
		/// </summary>
		protected void SetupGUI()
		{
			selectionModeMenu = TrayManager.CreateLongSelectMenu( TrayLocation.TopRight, "SelectionModeMenu", "Selection Mode", 300, 150, 3 );
			selectionModeMenu.AddItem( "None" );
			selectionModeMenu.AddItem( "Mouse Select" );
			selectionModeMenu.AddItem( "Selection Box" );
			selectionModeMenu.SelectItem( 0 );
			selectionModeMenu.SelectedIndexChanged += new System.EventHandler( selectionModeMenu_SelectedIndexChanged );

			MouseLocationLabel = TrayManager.CreateLabel( TrayLocation.TopLeft, "Mouse Location", "", 350 );

			TrayManager.ShowCursor();
		}