public void writeSettings()
        {
            Settings       EditorSettings             = "EditorSettings";
            GuiTabBookCtrl DatablockEditorTreeTabBook = "DatablockEditorTreeTabBook";

            EditorSettings.beginGroup("DatablockEditor", true);

            EditorSettings.setValue("libraryTab", DatablockEditorTreeTabBook.getSelectedPage().AsString());
            if (this.getNumSelectedDatablocks() > 0)
            {
                EditorSettings.setValue("selectedDatablock", this.getSelectedDatablock().getName());
            }

            EditorSettings.endGroup();
        }
        public void apply()
        {
            EWorldEditor EWorldEditor = "EWorldEditor";

            GuiCheckBoxCtrl DoPosition    = this.FOT("DoPosition");
            GuiCheckBoxCtrl DoRotation    = this.FOT("DoRotation");
            GuiCheckBoxCtrl DoScale       = this.FOT("DoScale");
            GuiCheckBoxCtrl DoSize        = this.FOT("DoSize");
            GuiCheckBoxCtrl PosRelative   = this.FOT("PosRelative");
            GuiCheckBoxCtrl RotRelative   = this.FOT("RotRelative");
            GuiCheckBoxCtrl RotLocal      = this.FOT("RotLocal");
            GuiCheckBoxCtrl ScaleRelative = this.FOT("ScaleRelative");
            GuiCheckBoxCtrl ScaleLocal    = this.FOT("ScaleLocal");
            GuiCheckBoxCtrl SizeRelative  = this.FOT("SizeRelative");
            GuiCheckBoxCtrl SizeLocal     = this.FOT("SizeLocal");
            GuiTextEditCtrl PosY          = this.FOT("PosY");
            GuiTextEditCtrl PosX          = this.FOT("PosX");
            GuiTextEditCtrl PosZ          = this.FOT("PosZ");
            GuiTextEditCtrl ScaleX        = this.FOT("ScaleX");
            GuiTextEditCtrl ScaleY        = this.FOT("ScaleY");
            GuiTextEditCtrl ScaleZ        = this.FOT("ScaleZ");
            GuiTextEditCtrl SizeX         = this.FOT("SizeX");
            GuiTextEditCtrl SizeY         = this.FOT("SizeY");
            GuiTextEditCtrl SizeZ         = this.FOT("SizeZ");
            GuiTextEditCtrl Pitch         = this.FOT("Pitch");
            GuiTextEditCtrl Bank          = this.FOT("Bank");
            GuiTextEditCtrl Heading       = this.FOT("Heading");
            GuiTabBookCtrl  ScaleTabBook  = this.FOT("ScaleTabBook");

            string position    = DoPosition.getValue().AsString();
            string p           = PosX.getValue() + ' ' + PosY.getValue() + ' ' + PosZ.getValue();
            string relativePos = PosRelative.getValue();

            string rotate = DoRotation.getValue();
            string r      = Util.mDegToRad(Pitch.getValue().AsFloat()) + ' ' + Util.mDegToRad(Bank.getValue().AsFloat()) +
                            ' ' + Util.mDegToRad(Heading.getValue().AsFloat()).AsString();
            string relativeRot = RotRelative.getValue();
            string rotLocal    = RotLocal.getValue();

            string scale, s, sRelative, sLocal, size;

            // We need to check which Tab page is active
            if (ScaleTabBook.getSelectedPage() == 0)
            {
                // Scale Page
                scale     = DoScale.getValue();
                s         = ScaleX.getValue() + ' ' + ScaleY.getValue() + ' ' + ScaleZ.getValue();
                sRelative = ScaleRelative.getValue();
                sLocal    = ScaleLocal.getValue();

                size = false.AsString();
            }
            else
            {
                // Size Page
                size      = DoSize.getValue();
                s         = SizeX.getValue() + ' ' + SizeY.getValue() + ' ' + SizeZ.getValue();
                sRelative = SizeRelative.getValue();
                sLocal    = SizeLocal.getValue();

                scale = false.AsString();
            }

            EWorldEditor.transformSelection(position.AsBool(), p.AsPoint3F(), relativePos.AsBool(), rotate.AsBool(), r.AsPoint3F(), relativeRot.AsBool(), rotLocal.AsBool(),
                                            (scale.AsBool() ? 1 : (size.AsBool() ? 2 : 0)), s.AsPoint3F(), sRelative.AsBool(), sLocal.AsBool());
        }