Removed some of the old export png options.

This commit is contained in:
GrapeshotGames 2018-12-26 17:27:53 -05:00
parent ffea9dfb7e
commit 95e6096844
5 changed files with 9 additions and 42 deletions

View file

@ -118,10 +118,6 @@ namespace AtlasGridDataLibrary
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool showIslandNames = true;
[DefaultValue(false)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)]
public bool exportPngs = false;
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool showLines = true;

View file

@ -202,7 +202,7 @@ namespace ServerGridEditor
string WorldAtlasId, string WorldFriendlyName, string MetaWorldURL, float coordsScaling, bool showServerInfo, bool showLines, bool alphaBackground, bool showBackground, string backgroundImgPath,
MainForm mainForm, int idGenerator, int regionsIdGenerator, List<SpawnerInfoData> spawnerOverrideTemplates, bool bUseUTCTime, string Day0, float globalTransitionMinZ, string AdditionalCmdLineParams,
Dictionary<string, string> OverrideShooterGameModeDefaultGameIni, DateTime lastImageOverride, bool showDiscoZoneInfo, string discoZonesImagePath, List<ShipPathData> shipPaths, int shipPathsIdGenerator,
bool showShipPathsInfo, string modIDs, bool showIslandNames, bool exportPngs, bool showForeground, string foregroundImgPath, string globalGameplaySetup,
bool showShipPathsInfo, string modIDs, bool showIslandNames, bool showForeground, string foregroundImgPath, string globalGameplaySetup,
List<ServerTemplateData> serverTemplates, bool bIsFinalExport, string MapImageURL,string AuthListURL,
string WorldAtlasPassword, float columnUTCOffset)
{
@ -345,7 +345,6 @@ namespace ServerGridEditor
Data.shipPaths = shipPaths;
Data.shipPathsIdGenerator = shipPathsIdGenerator;
Data.showIslandNames = showIslandNames;
Data.exportPngs = exportPngs;
Data.globalGameplaySetup = globalGameplaySetup;
if (serverTemplates == null)
serverTemplates = new List<ServerTemplateData>();
@ -400,7 +399,6 @@ namespace ServerGridEditor
public bool showDiscoZoneInfo = true;
public bool showShipPathsInfo = true;
public bool showIslandNames = true;
public bool exportPngs = false;
public bool disableImageExporting = false;
public bool showLines = true;
public bool alphaBackground = false;
@ -484,7 +482,7 @@ namespace ServerGridEditor
AtlasGridData ProjectObj = new AtlasGridData().SetFromData(cellSize, servers, islandInstances, discoZones, spawnRegions, WorldAtlasId, WorldFriendlyName, MetaWorldURL,
coordsScaling, showServerInfo, showLines, alphaBackground, showBackground, backgroundImgPath, mainForm, idGenerator, regionsIdGenerator, mainForm.spawners.spawnersInfo, bUseUTCTime,
Day0, globalTransitionMinZ, AdditionalCmdLineParams, OverrideShooterGameModeDefaultGameIni, LastImageOverrideUTC, showDiscoZoneInfo, discoZonesImagePath, shipPaths,
shipPathsIdGenerator, showShipPathsInfo, ModIDs, showIslandNames, exportPngs, showForeground, foregroundImgPath, globalGameplaySetup, serverTemplates, bIsFinalExport, MapImageURL, AuthListURL,
shipPathsIdGenerator, showShipPathsInfo, ModIDs, showIslandNames, showForeground, foregroundImgPath, globalGameplaySetup, serverTemplates, bIsFinalExport, MapImageURL, AuthListURL,
WorldAtlasPassword, columnUTCOffset);
ProjectObj.BaseServerArgs = BaseServerArgs;
ProjectObj.totalGridsX = numOfCellsX;
@ -653,7 +651,6 @@ namespace ServerGridEditor
showServerInfo = deserializedProject.showServerInfo;
showDiscoZoneInfo = deserializedProject.showDiscoZoneInfo;
showIslandNames = deserializedProject.showIslandNames;
exportPngs = deserializedProject.exportPngs;
showShipPathsInfo = deserializedProject.showShipPathsInfo;
showLines = deserializedProject.showLines;
alphaBackground = deserializedProject.alphaBackground;

View file

@ -201,7 +201,7 @@ namespace ServerGridEditor
mainForm.islands.Add(editedIsland.name, editedIsland);
//rename image
string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg");
string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img.jpg";
editedIsland.InvalidateImage();
File.Move(editedIsland.imagePath, newImgPath);
@ -280,7 +280,7 @@ namespace ServerGridEditor
}
//Copy the image to our local imgs directory
string newImgPath = MainForm.imgsDir + "/" + Name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg");
string newImgPath = MainForm.imgsDir + "/" + Name + "_img.jpg";
File.Copy(ImgLocation, newImgPath, true);

View file

@ -86,7 +86,6 @@
this.imageQualityTxtbox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.showIslandNamesChckBox = new System.Windows.Forms.CheckBox();
this.exportPngsChckBox = new System.Windows.Forms.CheckBox();
this.showForegroundChckBox = new System.Windows.Forms.CheckBox();
this.chooseForegroundBtn = new System.Windows.Forms.Button();
this.foregroundScaleBox = new System.Windows.Forms.NumericUpDown();
@ -680,20 +679,6 @@
this.showIslandNamesChckBox.UseVisualStyleBackColor = true;
this.showIslandNamesChckBox.CheckedChanged += new System.EventHandler(this.showIslandNamesChckBox_CheckedChanged);
//
// exportPngsChckBox
//
this.exportPngsChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.exportPngsChckBox.AutoSize = true;
this.exportPngsChckBox.Checked = true;
this.exportPngsChckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.exportPngsChckBox.Location = new System.Drawing.Point(404, 618);
this.exportPngsChckBox.Name = "exportPngsChckBox";
this.exportPngsChckBox.Size = new System.Drawing.Size(89, 17);
this.exportPngsChckBox.TabIndex = 31;
this.exportPngsChckBox.Text = "Export PNGS";
this.exportPngsChckBox.UseVisualStyleBackColor = true;
this.exportPngsChckBox.CheckedChanged += new System.EventHandler(this.exportPngsChckBox_CheckedChanged);
//
// showForegroundChckBox
//
this.showForegroundChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -777,7 +762,6 @@
this.Controls.Add(this.foregroundScaleBox);
this.Controls.Add(this.chooseForegroundBtn);
this.Controls.Add(this.showForegroundChckBox);
this.Controls.Add(this.exportPngsChckBox);
this.Controls.Add(this.showIslandNamesChckBox);
this.Controls.Add(this.imageQualityTxtbox);
this.Controls.Add(this.label4);
@ -887,7 +871,6 @@
private System.Windows.Forms.TextBox imageQualityTxtbox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox showIslandNamesChckBox;
private System.Windows.Forms.CheckBox exportPngsChckBox;
private System.Windows.Forms.CheckBox showForegroundChckBox;
private System.Windows.Forms.Button chooseForegroundBtn;
private System.Windows.Forms.NumericUpDown foregroundScaleBox;

View file

@ -1147,7 +1147,6 @@ namespace ServerGridEditor
showServerInfoCheckbox.Checked = currentProject.showServerInfo;
showDiscoZoneInfoCheckbox.Checked = currentProject.showDiscoZoneInfo;
showIslandNamesChckBox.Checked = currentProject.showIslandNames;
exportPngsChckBox.Checked = currentProject.exportPngs;
showShipPathsInfoChckBox.Checked = currentProject.showShipPathsInfo;
disableImageExportingCheckBox.Checked = currentProject.disableImageExporting;
showLinesCheckbox.Checked = currentProject.showLines;
@ -1531,7 +1530,7 @@ namespace ServerGridEditor
return;
MagickImage tgaImg = new MagickImage(image);
tgaImg.Format = currentProject.exportPngs ? MagickFormat.Png : MagickFormat.Jpeg;
tgaImg.Format = MagickFormat.Jpeg;
tgaImg.Quality = editorConfig.ImageQuality;
tgaImg.Write(filePath);
tgaImg.Dispose();
@ -1644,7 +1643,6 @@ namespace ServerGridEditor
showServerInfoCheckbox.Checked = currentProject.showServerInfo;
showDiscoZoneInfoCheckbox.Checked = currentProject.showDiscoZoneInfo;
showIslandNamesChckBox.Checked = currentProject.showIslandNames;
exportPngsChckBox.Checked = currentProject.exportPngs;
showShipPathsInfoChckBox.Checked = currentProject.showShipPathsInfo;
disableImageExportingCheckBox.Checked = currentProject.disableImageExporting;
showLinesCheckbox.Checked = currentProject.showLines;
@ -1666,7 +1664,7 @@ namespace ServerGridEditor
if (currentProject == null)
return;
saveFileDialog.Filter = currentProject.exportPngs ? "png files (*.png)|*.png" : "jpg files (*.jpg)|*.jpg";
saveFileDialog.Filter = "jpg files (*.jpg)|*.jpg";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
ExportImage(saveFileDialog.FileName, -1, -1, true, editorConfig.AtlasImagesRes);
@ -2143,7 +2141,7 @@ namespace ServerGridEditor
if (!Directory.Exists(mapExportDir))
Directory.CreateDirectory(mapExportDir);
string imgPath = mapExportDir + "/MapImg" + (currentProject.exportPngs ? ".png" : ".jpg");
string imgPath = mapExportDir + "/MapImg.jpg";
string cellImgName = "CellImg";
string serverConfigPath = exportDir + "/" + actualJsonFile;
@ -2172,8 +2170,8 @@ namespace ServerGridEditor
if (!disableImageExportingCheckBox.Checked)
{
ExportImage(gameMapExportDir + "/MapImg" + (currentProject.exportPngs ? ".png" : ".jpg"), -1, -1, true, editorConfig.AtlasImagesRes);
ExportCellImages(gameMapExportDir + string.Format("/{0}" + (currentProject.exportPngs ? ".png" : ".jpg"), cellImgName));
ExportImage(gameMapExportDir + "/MapImg.jpg", -1, -1, true, editorConfig.AtlasImagesRes);
ExportCellImages(gameMapExportDir + string.Format("/{0}.jpg", cellImgName));
}
}
}
@ -2238,13 +2236,6 @@ namespace ServerGridEditor
mapPanel.Invalidate();
}
private void exportPngsChckBox_CheckedChanged(object sender, EventArgs e)
{
if (currentProject != null)
currentProject.exportPngs = exportPngsChckBox.Checked;
mapPanel.Invalidate();
}
private void showForegroundChckBox_CheckedChanged(object sender, EventArgs e)
{
currentProject.showForeground = showForegroundChckBox.Checked;