public static void initializeRiverEditor() { Omni.self.Print(" % - Initializing River Editor"); gui.RiverEditor.initialize(); RiverEditorGui.initialize(); RiverEditorToolbar.initialize(); // Add ourselves to EditorGui, where all the other tools reside RiverEditorGui riverEditorGui = "RiverEditorGui"; riverEditorGui.setVisible(false); RiverEditorToolbar oRiverEditorToolbar = "RiverEditorToolbar"; oRiverEditorToolbar.setVisible(false); ((GuiWindowCollapseCtrl)"RiverEditorOptionsWindow").setVisible(false); GuiWindowCollapseCtrl RiverEditorTreeWindow = "RiverEditorTreeWindow"; RiverEditorTreeWindow.setVisible(false); EditorGui EditorGui = "EditorGui"; EditorGui.add("RiverEditorGui"); EditorGui.add("RiverEditorToolbar"); EditorGui.add("RiverEditorOptionsWindow"); EditorGui.add("RiverEditorTreeWindow"); ObjectCreator oRiverEditorPlugin = new ObjectCreator("ScriptObject", "RiverEditorPlugin", typeof(RiverEditorPlugin)); oRiverEditorPlugin["editorGui"] = "RiverEditorGui"; oRiverEditorPlugin.Create(); RiverEditorPlugin RiverEditorPlugin = "RiverEditorPlugin"; RiverEditorPlugin.initialize(); }
public override void onDeactivated() { RiverEditorGui RiverEditorGui = "RiverEditorGui"; GuiControl RiverEditorToolbar = "RiverEditorToolbar"; GuiWindowCollapseCtrl RiverEditorOptionsWindow = "RiverEditorOptionsWindow"; GuiWindowCollapseCtrl RiverEditorTreeWindow = "RiverEditorTreeWindow"; GizmoProfile GlobalGizmoProfile = "GlobalGizmoProfile"; //Copyright Winterleaf Entertainment L.L.C. 2013 if (!this["isActive"].AsBool()) { return; } this["isActive"] = false.AsString(); //Copyright Winterleaf Entertainment L.L.C. 2013 this.writeSettings(); omni.bGlobal["$River::EditorOpen"] = false; RiverEditorGui.setVisible(false); RiverEditorToolbar.setVisible(false); RiverEditorOptionsWindow.setVisible(false); RiverEditorTreeWindow.setVisible(false); this.map.pop(); // Restore the previous Gizmo // alignment settings. GlobalGizmoProfile["alignment"] = this["prevGizmoAlignment"]; // Allow the Gui to cleanup. RiverEditorGui.onEditorDeactivated(); base.onDeactivated(); }
public override void onActivated() { RiverEditorGui RiverEditorGui = "RiverEditorGui"; GuiControl RiverEditorToolbar = "RiverEditorToolbar"; GuiWindowCollapseCtrl RiverEditorOptionsWindow = "RiverEditorOptionsWindow"; GuiWindowCollapseCtrl RiverEditorTreeWindow = "RiverEditorTreeWindow"; GuiTreeViewCtrl RiverTreeView = "RiverTreeView"; EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar"; GizmoProfile GlobalGizmoProfile = "GlobalGizmoProfile"; EditorGui EditorGui = "EditorGui"; //Copyright Winterleaf Entertainment L.L.C. 2013 this["isActive"] = true.AsString(); //Copyright Winterleaf Entertainment L.L.C. 2013 this.readSettings(); omni.bGlobal["$River::EditorOpen"] = true; ((GuiBitmapButtonCtrl) ((GuiDynamicCtrlArrayControl)"ToolsPaletteArray").findObjectByInternalName( "RiverEditorAddRiverMode", false)).performClick(); EditorGui.bringToFront("RiverEditorGui"); RiverEditorGui.setVisible(true); RiverEditorGui.makeFirstResponder(true); RiverEditorToolbar.setVisible(true); RiverEditorOptionsWindow.setVisible(true); RiverEditorTreeWindow.setVisible(true); RiverTreeView.open("ServerRiverSet", true); this.map.push(); // Store this on a dynamic field // in order to restore whatever setting // the user had before. this["prevGizmoAlignment"] = GlobalGizmoProfile["alignment"]; // The DecalEditor always uses Object alignment. GlobalGizmoProfile["alignment"] = "Object"; // Set the status bar here until all tool have been hooked up EditorGuiStatusBar.setInfo("River editor."); EditorGuiStatusBar.setSelection(""); // Allow the Gui to setup. RiverEditorGui.onEditorActivated(); base.onActivated(); }