Esempio n. 1
0
        IVViewMenu createMenu() 
        {
            CustomModeSettings settings = setup();

            SelectorDataContainer container = (SelectorDataContainer)settings.dataInstance;

            IVVSimpleMenuItem[] INTItems = {
                 new VViewSimpleMenuItem("Part selector (tree-traversal)",container.selectorTree),
                 new VViewSimpleMenuItem("Part selector (global list)",container.selectorGlobal),
                 new VViewSimpleCustomMenuItem("Zoom on selection:",container.getZoom,container.setZoom),
                 new VViewSimpleCustomMenuItem("Affect symmetry:",container.getSymm,container.setSymm)
                                       };
            VViewSimpleMenu rootMenu = new VViewSimpleMenu(INTItems, "Part selector");
            container.selectorTree.setRoot((IVViewMenu)rootMenu);
            container.selectorGlobal.setRoot((IVViewMenu)rootMenu);
            container.CustomSettings = settings;
            rootMenu.setCustomSettings(settings);

            return rootMenu;
        }
Esempio n. 2
0
        IVViewMenu createMenu()
        {
            CustomModeSettings settings = setup();
            DiscoData data = (DiscoData)settings.dataInstance;
            //we dont need to, but if we want interaction in RPM we can create a menu
            //two options: either use a combination of VViewSimpleMenus, VViewSimpleMenuItems
            //and VViewSimpleCustomMenuItem, or...
            //Implement the IVViewMenu interface.

            IVVSimpleMenuItem[] INTItems = {
                 new VViewSimpleCustomMenuItem("STROBE:",data.getStrobe,data.setStrobe)
                                       };
            VViewSimpleMenu rootMenu = new VViewSimpleMenu(INTItems, "DISCO MODE");
            
            //either way, all menus associated with a custom display mode must have that mode set
            rootMenu.setCustomSettings(settings);

            //finally, return the menu so that it can be hooked up to the list
            return rootMenu;
        }
Esempio n. 3
0
        private void setupMenus() {
            //well I was gonna have to hardcode this SOMEWHERE.
            List<IVVSimpleMenuItem> itemList = new List<IVVSimpleMenuItem>();

            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Active: ", settings, "", "drawPlane"));
            for (int i = 0; i < ViewerConstants.PLANES.Length; i++) 
            {
                itemList.Add(new VViewSimpleMenuItem(ViewerConstants.PLANES[i], settings, "drawPlane", "", i, false));
            }
            VViewSimpleMenu orientationMENU = new VViewSimpleMenu(itemList.ToArray(), "Vessel orientation");

            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Up", settings, "scrOffY", "", 128, true));
            itemList.Add(new VViewSimpleMenuItem("Down", settings, "scrOffY", "", -128, true));
            itemList.Add(new VViewSimpleMenuItem("Left", settings, "scrOffX", "", 128, true));
            itemList.Add(new VViewSimpleMenuItem("Right", settings, "scrOffX", "", -128, true));
            VViewSimpleMenu manualMoveMENU = new VViewSimpleMenu(itemList.ToArray(), "Manual repositioning");

            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Autocentering:", settings, "autoCenter", "autoCenter"));
            itemList.Add(new VViewSimpleMenuItem("Hor. root center:", settings, "centerOnRootH", "centerOnRootH"));
            itemList.Add(new VViewSimpleMenuItem("Ver. root center:", settings, "centerOnRootV", "centerOnRootV"));
            itemList.Add(new VViewSimpleMenuItem("Manual repositioning", manualMoveMENU));
            VViewSimpleMenu positionMENU = new VViewSimpleMenu(itemList.ToArray(), "Vessel position");

            manualMoveMENU.setRoot((IVViewMenu)positionMENU);

            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Active: ", settings, "", "spinAxis"));
            for (int i = 0; i < ViewerConstants.AXES.Length; i++)
            {
                itemList.Add(new VViewSimpleMenuItem(ViewerConstants.AXES[i] + " axis", settings, "spinAxis", "", i, false));
            }
            itemList.Add(new VViewSimpleMenuItem("Rotation speed:", settings, "spinSpeed", "spinSpeed"));
            VViewSimpleMenu rotationMENU = new VViewSimpleMenu(itemList.ToArray(), "Display autorotation");

            IVVSimpleMenuItem[] DCONItems = {
                new VViewSimpleMenuItem("Vessel orientation",orientationMENU),
                new VViewSimpleMenuItem("Vessel position",positionMENU),
                new VViewSimpleMenuItem("Autoscaling:",settings,"centerRescale","centerRescale"),
                new VViewSimpleMenuItem("Display autorotation",rotationMENU),
                                      };
            VViewSimpleMenu displayConfigMENU = new VViewSimpleMenu(DCONItems, "Display configuration");

            orientationMENU.setRoot((IVViewMenu)displayConfigMENU);
            positionMENU.setRoot((IVViewMenu)displayConfigMENU);
            rotationMENU.setRoot((IVViewMenu)displayConfigMENU); 

            /***************************************************************************************************/
            itemList.Clear();
            
            itemList.Add(new VViewSimpleMenuItem("Color dull:",settings,"colorModeFillDull","colorModeFillDull"));
            itemList.Add(new VViewSimpleMenuItem("Active: ", settings, "", "colorModeFill"));
            for (int i = 0; i < ViewerConstants.COLORMODES.Length; i++)
            {
                itemList.Add(new VViewSimpleMenuItem(ViewerConstants.COLORMODES[i], settings, "colorModeFill", "", i, false));
            }
            VViewSimpleMenu passiveDisplayFillMENU = new VViewSimpleMenu(itemList.ToArray(), "Passive display (mesh)");
            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Color dull:", settings, "colorModeWireDull", "colorModeWireDull"));
            itemList.Add(new VViewSimpleMenuItem("Active: ", settings, "", "colorModeWire"));
            for (int i = 0; i < ViewerConstants.COLORMODES.Length; i++)
            {
                itemList.Add(new VViewSimpleMenuItem(ViewerConstants.COLORMODES[i], settings, "colorModeWire", "", i, false));
            }
            VViewSimpleMenu passiveDisplayWireMENU = new VViewSimpleMenu(itemList.ToArray(), "Passive display (wire)");
            itemList.Clear();
            itemList.Add(new VViewSimpleMenuItem("Color dull:", settings, "colorModeBoxDull", "colorModeBoxDull"));
            itemList.Add(new VViewSimpleMenuItem("Active: ", settings, "", "colorModeBox"));
            for (int i = 0; i < ViewerConstants.COLORMODES.Length; i++)
            {
                itemList.Add(new VViewSimpleMenuItem(ViewerConstants.COLORMODES[i], settings, "colorModeBox", "", i, false));
            }
            VViewSimpleMenu passiveDisplayBoundsMENU = new VViewSimpleMenu(itemList.ToArray(), "Passive display (bounds)");

            IVVSimpleMenuItem[] PASItems = {
                new VViewSimpleMenuItem("Passive display (mesh)",passiveDisplayFillMENU),
                new VViewSimpleMenuItem("Passive display (wire)",passiveDisplayWireMENU),
                new VViewSimpleMenuItem("Passive display (bounds)",passiveDisplayBoundsMENU),
                new VViewSimpleMenuItem("Display axes:",settings,"displayAxes","displayAxes"),
                new VViewSimpleMenuItem("Display COM:",settings,"displayCOM","displayCOM"),
                new VViewSimpleMenuItem("Display engine status:",settings,"displayEngines","displayEngines"),
                new VViewSimpleMenuItem("Display landing assist:",settings,"displayGround","displayGround"),
                                      };
            VViewSimpleMenu passiveDisplaysMENU = new VViewSimpleMenu(PASItems, "Passive display modes");

            passiveDisplayFillMENU.setRoot((IVViewMenu)passiveDisplaysMENU);
            passiveDisplayWireMENU.setRoot((IVViewMenu)passiveDisplaysMENU);
            passiveDisplayBoundsMENU.setRoot((IVViewMenu)passiveDisplaysMENU);

            /***************************************************************************************************/

            VViewCustomMenusMenu customDisplaysMENU = new VViewCustomMenusMenu("Custom display modes", viewer);

            /***************************************************************************************************/

            IVVSimpleMenuItem[] OTHItems = {
                new VViewSimpleMenuItem("Latency mode:",settings,"latency","latency"),
                                      };
            VViewSimpleMenu configurationMENU = new VViewSimpleMenu(OTHItems, "Other configuration");

            /***************************************************************************************************/

            IVVSimpleMenuItem[] MAMItems = {
                new VViewSimpleMenuItem("Display configuration",displayConfigMENU),
                new VViewSimpleMenuItem("Passive display modes",passiveDisplaysMENU),
                new VViewSimpleMenuItem("Custom display modes",customDisplaysMENU),
                new VViewSimpleMenuItem("Other configuration",configurationMENU),
                                      };
            VViewSimpleMenu mainMenu = new VViewSimpleMenu(MAMItems, "Main menu");

            displayConfigMENU.setRoot((IVViewMenu)mainMenu);
            passiveDisplaysMENU.setRoot((IVViewMenu)mainMenu);
            customDisplaysMENU.setRoot((IVViewMenu)mainMenu);
            configurationMENU.setRoot((IVViewMenu)mainMenu);

            IVVSimpleMenuItem[] HIDItems = {
                new VViewSimpleMenuItem("Show",mainMenu)
                                      };
            VViewSimpleMenu hideMenu = new VViewSimpleMenu(HIDItems, "Hidden");
            /*dispModeMenu.setRoot((IVViewMenu)mainMenu);
            */
            mainMenu.setRoot((IVViewMenu)hideMenu);
            activeMenu = hideMenu;

        }