コード例 #1
0
        public void onMultiSelect(SimSet set)
        {
            EditorTree EditorTree = "EditorTree";
            EditorGui  EditorGui  = "EditorGui";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar  = "EditorGuiStatusBar";
            ETransformSelection          ETransformSelection = "ETransformSelection";
            int count = set.getCount();
            int i     = 0;

            for (uint x = 0; x < set.getCount(); x++)
            {
                SimObject obj = set.getObject(x);
                if (obj.isMethod("onEditorSelect"))
                {
                    obj.call("onEditorSelect", count.AsString());
                }

                i++;

                EditorTree.addSelection(obj, i == count);
                EditorGui.currentEditor.onObjectSelected(obj);
            }
            // Inform the camera
            console.commandToServer("EditorOrbitCameraSelectChange", new string[] { count.AsString(), getSelectionCentroid().AsString() });
            EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString());

            // Update the Transform Selection window, if it is
            // visible.

            if (ETransformSelection.isVisible())
            {
                ETransformSelection.onSelectionChanged();
            }
        }
コード例 #2
0
        public void onUnSelect(SimObject obj)
        {
            EditorGui  EditorGui  = "EditorGui";
            Inspector  Inspector  = "Inspector";
            EditorTree EditorTree = "EditorTree";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar  = "EditorGuiStatusBar";
            ETransformSelection          ETransformSelection = "ETransformSelection";

            if (obj.isObject() && obj.isMethod("onEditorUnselect"))
            {
                obj.call("onEditorUnselect");
            }

            EditorGui.currentEditor.onObjectDeselected(obj);

            Inspector.removeInspect(obj);
            EditorTree.removeSelection(obj);

            // Inform the camera
            console.commandToServer("EditorOrbitCameraSelectChange", new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() });

            EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString());

            // Update the Transform Selection window

            ETransformSelection.onSelectionChanged();
        }
コード例 #3
0
        public void onSelect(SimObject obj)
        {
            EditorTree EditorTree = "EditorTree";

            EditorTree.addSelection(obj, true);
            Util.setShadowVizLight(obj);
            if (obj.isObject() && obj.isMethod("onEditorSelect"))
            {
                obj.call("onEditorSelect", getSelectionSize().AsString());
            }


            EditorGui EditorGui = "EditorGui";

            EditorGui.currentEditor.onObjectSelected(obj);

            // Inform the camera

            console.commandToServer("EditorOrbitCameraSelectChange",
                                    new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() });

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString());

            // Update the materialEditorList

            iGlobal["$Tools::materialEditorList"] = obj.getId();

            // Used to help the Material Editor( the M.E doesn't utilize its own TS control )
            // so this dirty extension is used to fake it, just like the women I use to date...
            GuiWindowCollapseCtrl womanIUseToDate = "MaterialEditorPreviewWindow";
            GuiControl            theOtherTramp   = "MaterialEditorGui";

            if (womanIUseToDate.isVisible())
            {
                theOtherTramp.call("prepareActiveObject");
            }


            // Update the Transform Selection window

            ETransformSelection ETransformSelection = "ETransformSelection";

            ETransformSelection.onSelectionChanged();
        }
コード例 #4
0
        public override void onClearSelection()
        {
            EditorGui  EditorGui  = "EditorGui";
            Inspector  Inspector  = "Inspector";
            EditorTree EditorTree = "EditorTree";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar  = "EditorGuiStatusBar";
            ETransformSelection          ETransformSelection = "ETransformSelection";

            EditorGui.currentEditor.onSelectionCleared();
            EditorTree.clearSelection();

            // Inform the camera
            console.commandToServer("EditorOrbitCameraSelectChange", new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() });

            EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString());
            // Update the Transform Selection window

            ETransformSelection.onSelectionChanged();
        }