private void _setupControls() { TrayManager.ShowCursor(); // make room for the controls TrayManager.ShowLogo(TrayLocation.TopRight); TrayManager.ShowFrameStats(TrayLocation.TopRight); TrayManager.ToggleAdvancedFrameStats(); this.infoLabel = TrayManager.CreateLabel(TrayLocation.Top, "TInfo", "", 350); this.editMenu = TrayManager.CreateLongSelectMenu(TrayLocation.Bottom, "EditMode", "Edit Mode", 370, 250, 3); this.editMenu.AddItem("None"); this.editMenu.AddItem("Elevation"); this.editMenu.AddItem("Blend"); this.editMenu.SelectItem(0); // no edit mode this.editMenu.SelectedIndexChanged += _itemSelected; this.flyBox = TrayManager.CreateCheckBox(TrayLocation.Bottom, "Fly", "Fly"); this.flyBox.SetChecked(false, false); this.flyBox.CheckChanged += _checkBoxToggled; this.shadowsMenu = TrayManager.CreateLongSelectMenu(TrayLocation.Bottom, "Shadows", "Shadows", 370, 250, 3); this.shadowsMenu.AddItem("None"); this.shadowsMenu.AddItem("Color Shadows"); this.shadowsMenu.AddItem("Depth Shadows"); this.shadowsMenu.SelectItem(0); this.shadowsMenu.SelectedIndexChanged += _itemSelected; var 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() { this.selectionModeMenu = TrayManager.CreateLongSelectMenu(TrayLocation.TopRight, "SelectionModeMenu", "Selection Mode", 300, 150, 3); this.selectionModeMenu.AddItem("None"); this.selectionModeMenu.AddItem("Mouse Select"); this.selectionModeMenu.AddItem("Selection Box"); this.selectionModeMenu.SelectItem(0); this.selectionModeMenu.SelectedIndexChanged += selectionModeMenu_SelectedIndexChanged; this.MouseLocationLabel = TrayManager.CreateLabel(TrayLocation.TopLeft, "Mouse Location", "", 350); TrayManager.ShowCursor(); }
protected void CreateControls() { TrayManager.CreateLabel(TrayLocation.TopLeft, "JuliaParamLabel", "Julia Parameters", 200); Slider sl = TrayManager.CreateThickSlider(TrayLocation.TopLeft, "RealSlider", "Real", 200, 80, -1, 1, 50); sl.SetValue(this.globalReal, false); sl.SliderMoved += new SliderMovedHandler(sl_SliderMoved); sl = TrayManager.CreateThickSlider(TrayLocation.TopLeft, "ImagSlider", "Imag", 200, 80, -1, 1, 50); sl.SetValue(this.globalImag, false); sl.SliderMoved += new SliderMovedHandler(sl_SliderMoved); sl = TrayManager.CreateThickSlider(TrayLocation.TopLeft, "ThetaSlider", "Theta", 200, 80, -1, 1, 50); sl.SetValue(this.globalTheta, false); sl.SliderMoved += new SliderMovedHandler(sl_SliderMoved); TrayManager.ShowCursor(); }
protected void SetupTogglers() { // create check boxes to toggle the visibility of our particle systems TrayManager.CreateLabel(TrayLocation.TopLeft, "VisLabel", "Particles"); var box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Fireworks", "Fireworks", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = true; box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Fountain1", "Fountain A", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = true; box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Fountain2", "Fountain B", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = true; box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Aureola", "Aureola", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = false; box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Nimbus", "Nimbus", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = false; box = TrayManager.CreateCheckBox(TrayLocation.TopLeft, "Rain", "Rain", 130); box.CheckChanged += new CheckChangedHandler(_checkBoxToggled); box.IsChecked = false; }