mirror of
https://github.com/tribufu/ServerGridEditor
synced 2026-05-06 07:07:32 +00:00
Minor save dialog settings initial path fix.
Stopped doing a copy for watertile picking. Just use image in that path already. Added same poorly named water tile again with .png at end. Should replace one day. Set this on all examples
This commit is contained in:
parent
1db4ee1af8
commit
019c4903ca
6 changed files with 13 additions and 8 deletions
|
|
@ -1610,6 +1610,8 @@ namespace ServerGridEditor
|
|||
return;
|
||||
|
||||
saveFileDialog.Filter = "json files (*.json)|*.json";
|
||||
saveFileDialog.FileName = actualJsonFile;
|
||||
saveFileDialog.InitialDirectory = GlobalSettings.Instance.ProjectsDir;
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
File.WriteAllText(saveFileDialog.FileName, currentProject.Serialize(this));
|
||||
|
|
@ -1851,7 +1853,8 @@ namespace ServerGridEditor
|
|||
if (currentProject == null)
|
||||
return;
|
||||
|
||||
openFileDialog.Filter = "png files (*.png)|*.png";
|
||||
openFileDialog.Filter = "png files (*.png)|*.png|All files (*.*)|*.*";
|
||||
openFileDialog.FileName = "";
|
||||
openFileDialog.InitialDirectory = GlobalSettings.Instance.BaseDir + waterTilesDir.Replace("./","");
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
|
@ -1862,10 +1865,10 @@ namespace ServerGridEditor
|
|||
if (tile != null)
|
||||
tile.Dispose();
|
||||
|
||||
File.Copy(openFileDialog.FileName, imgName + openFileDialog.SafeFileName, true);
|
||||
SetTileImage(openFileDialog.FileName);
|
||||
//File.Copy(openFileDialog.FileName, imgName + openFileDialog.SafeFileName, true);
|
||||
currentProject.showBackground = true;
|
||||
currentProject.backgroundImgPath = imgName;
|
||||
currentProject.backgroundImgPath = imgName + openFileDialog.SafeFileName;
|
||||
SetTileImage(currentProject.backgroundImgPath);
|
||||
tiledBackgroundCheckbox.Checked = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue