/// <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(); }
/// <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" ); }
/// <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(); }