public override void onDeactivated()
        {
            EditorGui EditorGui = "EditorGui";

            ParticleEditor.PE_Window PE_Window = "PE_Window";

            GuiControl WorldEditorToolbar = EditorGui.FOT("WorldEditorToolbar");

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            WorldEditorToolbar.setVisible(false);
            PE_Window.setVisible(false);

            if (sGlobal["$ParticleEditor::emitterNode"].isObject())
            {
                sGlobal["$ParticleEditor::emitterNode"].delete();
            }

            this.map.pop();

            base.onDeactivated();
        }
        public override void onActivated()
        {
            ParticleEditor ParticleEditor = "ParticleEditor";
            EditorGui      EditorGui      = "EditorGui";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            ParticleEditor.PE_Window     PE_Window          = "PE_Window";

            GuiControl WorldEditorToolbar = EditorGui.FOT("WorldEditorToolbar");

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!ParticleEditor["isInitialized"].AsBool())
            {
                ParticleEditor.initEditor();
                ParticleEditor["isInitialized"] = true.AsString();
            }

            WorldEditorToolbar.setVisible(true);
            EditorGui.bringToFront(PE_Window);
            PE_Window.setVisible(true);
            PE_Window.makeFirstResponder(true);

            this.map.push();

            ParticleEditor.resetEmitterNode();

            // Set the status bar here
            EditorGuiStatusBar.setInfo("Particle editor.");
            EditorGuiStatusBar.setSelection("");

            base.onActivated();
        }