Beispiel #1
0
        public static void ReadConfig(string file)
        {
            var configData = ConfigIO.LoadConfig(file);

            CameraSpeed            = configData.CameraSpeed;
            BackgroundColor        = configData.BackgroundColor;
            FrameRectColor         = configData.FrameRectColor;
            HoverFrameRectColor    = configData.HoverFrameRectColor;
            SelectedFrameRectColor = configData.SelectedFrameRectColor;
            TextureFilterMode      = configData.TextureFilterMode;
            FrameMargin            = configData.FrameMargin;
            SpriteMarkUpControl    = configData.SpriteMarkUpControl;
            DragCameraControl      = configData.DragCameraControl;
            SelectSpriteControl    = configData.SelectSpriteControl;
            ViewZoomControl        = configData.ViewZoomControl;
            OverwriteImageWhenTransparencyModified = configData.OverwriteImageWhenTransparencyModified;
            PackSpriteSheetWhenExportingSpriteMap  = configData.PackSpriteSheetWhenExportingSpriteMap;
            ForcePowTwo = configData.ForcePowTwo;
            ForceSquare = configData.ForceSquare;
            Padding     = configData.Padding;
        }
Beispiel #2
0
        public static void WriteConfig()
        {
            var configData = new ConfigIO.ConfigData();

            configData.CameraSpeed            = CameraSpeed;
            configData.BackgroundColor        = BackgroundColor;
            configData.FrameRectColor         = FrameRectColor;
            configData.HoverFrameRectColor    = HoverFrameRectColor;
            configData.SelectedFrameRectColor = SelectedFrameRectColor;
            configData.TextureFilterMode      = TextureFilterMode;
            configData.FrameMargin            = FrameMargin;
            configData.SpriteMarkUpControl    = SpriteMarkUpControl;
            configData.DragCameraControl      = DragCameraControl;
            configData.SelectSpriteControl    = SelectSpriteControl;
            configData.ViewZoomControl        = ViewZoomControl;
            configData.OverwriteImageWhenTransparencyModified = OverwriteImageWhenTransparencyModified;
            configData.PackSpriteSheetWhenExportingSpriteMap  = PackSpriteSheetWhenExportingSpriteMap;
            configData.ForcePowTwo = ForcePowTwo;
            configData.ForceSquare = ForceSquare;
            configData.Padding     = Padding;

            ConfigIO.WriteConfig(configData, SETTINGS_FILE_NAME);
        }