public override void onWorldEditorStartup()
        {
            EditorGui       EditorGui       = "EditorGui";
            ESettingsWindow ESettingsWindow = "ESettingsWindow";

            // Add ourselves to the window menu.
            string accel = EditorGui.addToEditorsMenu("Mesh Road Editor", "", this);

            // Add ourselves to the ToolsToolbar
            string tooltip = "Mesh Road Editor (" + accel + ")";

            EditorGui.addToToolsToolbar("MeshRoadEditorPlugin", "MeshRoadEditorPalette", Util._expandFilename("tools/worldEditor/images/toolbar/mesh-road-editor"), tooltip);

            //connect editor windows
            ((GuiWindowCollapseCtrl)"MeshRoadEditorOptionsWindow").attachTo("MeshRoadEditorTreeWindow");

            // Add ourselves to the Editor Settings window
            //exec( "./meshRoadEditorSettingsTab.gui" );
            omni.console.Call("MeshRoadEditorSettingsTab_initialize");
            ESettingsWindow.addTabPage("EMeshRoadEditorSettingsPage");
        }
示例#2
0
        public override void onWorldEditorStartup()
        {
            // Add ourselves to the window menu.
            EditorGui EditorGui = "EditorGui";

            string accel = EditorGui.addToEditorsMenu("Navigation Editor", "", this);

            // Add ourselves to the ToolsToolbar.
            string tooltip = "Navigation Editor (" + accel + ")";

            EditorGui.addToToolsToolbar("NavEditorPlugin", "NavEditorPalette",
                                        Util._expandFilename("tools/navEditor/images/nav-editor"), tooltip);

            GuiWindowCollapseCtrl NavEditorOptionsWindow = "NavEditorOptionsWindow";

            NavEditorOptionsWindow.attachTo("NavEditorTreeWindow");

            // Add ourselves to the Editor Settings window.
            //exec("./NavEditorSettingsTab.gui");
            ENavEditorSettingsPage.initialize();

            ESettingsWindow ESettingsWindow = "ESettingsWindow";

            ESettingsWindow.addTabPage("ENavEditorSettingsPage");

            ENavEditorSettingsPage NavEditorSettingsPage = "ENavEditorSettingsPage";

            NavEditorSettingsPage.init();

            // Add items to World Editor Creator
            Creator.EWCreatorWindow EWCreatorWindow = "EWCreatorWindow";
            EWCreatorWindow.beginGroup("Navigation");

            EWCreatorWindow.registerMissionObject("NavMesh", "Navigation mesh", "", "");
            EWCreatorWindow.registerMissionObject("NavPath", "Path", "", "");
            EWCreatorWindow.registerMissionObject("CoverPoint", "Cover point", "", "");

            EWCreatorWindow.endGroup("Navigation");
        }
        public override void onWorldEditorStartup()
        {
            EditorGui       EditorGui         = "EditorGui";
            MenuBuilder     ConvexActionsMenu = "ConvexActionsMenu";
            ESettingsWindow ESettingsWindow   = "ESettingsWindow";

            // Add ourselves to the window menu.
            string accel = EditorGui.addToEditorsMenu("Sketch Tool", "", this);

            // Add ourselves to the ToolsToolbar
            string tooltip = "Sketch Tool (" + accel + ")";

            EditorGui.addToToolsToolbar("ConvexEditorPlugin", "ConvexEditorPalette",
                                        omni.Util._expandFilename("tools/convexEditor/images/convex-editor-btn"), tooltip);

            //connect editor windows
            ((GuiWindowCollapseCtrl)"ConvexEditorOptionsWindow").attachTo("ConvexEditorTreeWindow");

            // Allocate our special menu.
            // It will be added/removed when this editor is activated/deactivated.

            if (!ConvexActionsMenu.isObject())
            {
                SingletonCreator ocf = new SingletonCreator("PopupMenu", "ConvexActionsMenu", typeof(MenuBuilder));
                ocf["barTitle"] = "Sketch";

                ocf["item[0]"] = "Hollow Selected Shape" + '\t' + "" + '\t' + "ConvexEditorGui.hollowSelection();";
                ocf["item[1]"] = "Recenter Selected Shape" + '\t' + "" + '\t' + "ConvexEditorGui.recenterSelection();";

                ConvexActionsMenu = ocf.Create();
            }

            this["popupMenu"] = ConvexActionsMenu;

            //exec( "./convexEditorSettingsTab.ed.gui" );
            omni.console.Call("ConvexEditorSettingsTab_initialize");
            ESettingsWindow.addTabPage("EConvexEditorSettingsPage");
        }
        public override void onWorldEditorStartup()
        {
            EditorGui EditorGui = "EditorGui";

            // Add ourselves to the window menu.
            string accel = EditorGui.addToEditorsMenu("Shape Editor", "", this);

            // Add ourselves to the ToolsToolbar
            string tooltip = "Shape Editor (" + accel + ")";

            EditorGui.addToToolsToolbar("ShapeEditorPlugin", "ShapeEditorPalette",
                                        Util._expandFilename("tools/worldEditor/images/toolbar/shape-editor"), tooltip);

            // Add ourselves to the Editor Settings window
            //exec( "./gui/ShapeEditorSettingsTab.gui" );
            //console.Call("ShapeEditorSettingsTab_initialize");
            ShapeEditorSettingsTab.initialize();


            ESettingsWindow ESettingsWindow = "ESettingsWindow";

            ESettingsWindow.addTabPage("EShapeEditorSettingsPage");

            ShapeEdPropWindow ShapeEdPropWindow = "ShapeEdPropWindow";

            ShapeEdPropWindow.attachTo("ShapeEdSelectWindow");
            ShapeEdAnimWindow ShapeEdAnimWindow = "ShapeEdAnimWindow";

            ShapeEdAnimWindow.resize(-1, 526, 593, 53);

            // Initialise gui
            ShapeEditor.ShapeEdSeqNodeTabBook ShapeEdSeqNodeTabBook = "ShapeEdSeqNodeTabBook";
            ShapeEdSeqNodeTabBook.selectPage(0);
            ShapeEdAdvancedWindow ShapeEdAdvancedWindow        = "ShapeEdAdvancedWindow";
            GuiTabBookCtrl        ShapeEdAdvancedWindowtabBook = ShapeEdAdvancedWindow.FOT("tabBook");

            ShapeEdAdvancedWindowtabBook.selectPage(0);

            ShapeEdSelectWindow ShapeEdSelectWindow        = "ShapeEdSelectWindow";
            GuiTabBookCtrl      ShapeEdSelectWindowtabBook = ShapeEdSelectWindow.FOT("tabBook");

            ShapeEdSelectWindowtabBook.selectPage(0);
            ShapeEdSelectWindow.navigate("");

            ShapeEditorToolbar  ShapeEditorToolbar = "ShapeEditorToolbar";
            GuiBitmapButtonCtrl orbitNodeBtn       = ShapeEditorToolbar.FOT("orbitNodeBtn");

            SetToggleButtonValue(orbitNodeBtn, "0");
            GuiBitmapButtonCtrl ghostMode = ShapeEditorToolbar.FOT("ghostMode");

            SetToggleButtonValue(ghostMode, "0");

            // Initialise hints menu
            SimGroup ShapeHintGroup = "ShapeHintGroup";

            ShapeEditor.ShapeEdHintMenu ShapeEdHintMenu = "ShapeEdHintMenu";
            ShapeEdHintMenu.clear();
            int count = ShapeHintGroup.getCount();

            for (uint i = 0; i < count; i++)
            {
                SimObject hint = ShapeHintGroup.getObject(i);
                ShapeEdHintMenu.add(hint["objectType"], hint);
            }
        }