public void updateParticleColor(string color)
            {
                PE_ParticleEditor PE_ParticleEditor = "PE_ParticleEditor";

                string arrayNum = this["arrayNum"];

                string r = Util.getWord(color, 0);
                string g = Util.getWord(color, 1);
                string b = Util.getWord(color, 2);
                string a = Util.getWord(color, 3);

                color         = r + ' ' + g + ' ' + b + ' ' + a;
                this["color"] = color;

                PE_ParticleEditor.updateParticle("colors[" + arrayNum + "]", color, false, false);
            }
            public override void onRenameItem()
            {
                PE_ParticleEditor PE_ParticleEditor = "PE_ParticleEditor";

                GuiPopUpMenuCtrl PopupMenu = this.FOT("PopupMenu");

                base.onRenameItem();

                //FIXME: need to check for validity of name and name clashes

                PE_ParticleEditor.setParticleDirty();

                // Resort menu.

                PopupMenu.sort();
            }
            public override void onCtrlClick()
            {
                PE_ParticleEditor PE_ParticleEditor    = "PE_ParticleEditor";
                GuiPopUpMenuCtrl  PEP_ParticleSelector = "PEP_ParticleSelector";

                int replaceSlot = 0;

                for (int i = 1; i < 5; i++)
                {
                    GuiPopUpMenuCtrl popup = "PEE_EmitterParticleSelector" + i;
                    if (popup.getSelected() == PEP_ParticleSelector.getSelected())
                    {
                        replaceSlot = i;
                        break;
                    }
                }

                PE_ParticleEditor.showNewDialog(replaceSlot.AsString());
            }
            public override void onDefaultClick()
            {
                PE_ParticleEditor PE_ParticleEditor = "PE_ParticleEditor";

                PE_ParticleEditor.showNewDialog("");
            }