Exemplo n.º 1
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();
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        /// <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();
        }