Skip to content

Commit

Permalink
add meadow version & fields forgotten
Browse files Browse the repository at this point in the history
  • Loading branch information
nyakase committed Jul 20, 2020
1 parent b219f93 commit 080c2f4
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/MeadowLandMaker/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion src/MeadowLandMaker/PackGen.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions src/MeadowLandMaker/PackGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ private void FontDialog_FileOk(object sender, CancelEventArgs e) {
private void generateButton_Click(object sender, EventArgs e) {
generateButton.Text = "Generating...";
generateButton.Enabled = false;
if(FontBox.Text=="" || StationeryBox.Text == "" || FontBox.Text == "" || FontNameBox.Text == "" || PackNameBox.Text == "") {
if(FontBox.Text=="" || StationeryBox.Text == "" || SpriteSheetBox.Text == "" || FontNameBox.Text == "" || PackNameBox.Text == "" || MeadowVersion.Text == "") {
StopGenerator();
MessageBox.Show("It appears you have forgotten to fill in some fields. All fields are required for pack generation.", "MeadowLand Maker", MessageBoxButtons.OK, MessageBoxIcon.Error);
string ErrorMSG = "It appears you have forgotten to fill in some fields. All fields are required for pack generation. The following fields were forgotten:\n\n";
if(FontBox.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Font, "); }
if(StationeryBox.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Stationery, "); }
if(SpriteSheetBox.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Sprite Sheet, "); }
if(FontNameBox.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Font Name, "); }
if(PackNameBox.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Pack Name, "); }
if(MeadowVersion.Text == "") { ErrorMSG = string.Concat(ErrorMSG, "Meadow Version"); }
MessageBox.Show(ErrorMSG, "MeadowLand Maker", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

Expand All @@ -58,7 +65,7 @@ private void generateButton_Click(object sender, EventArgs e) {

JObject packinfo =
new JObject(
new JProperty("versionNumber", 1),
new JProperty("versionNumber", MeadowVersion.Text),
new JProperty("pack",
new JObject(
new JProperty("spritesheetFilename", SpriteSheetDialog.SafeFileName),
Expand Down
4 changes: 2 additions & 2 deletions src/MeadowLandMaker/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.3.0")]
[assembly: AssemblyFileVersion("0.1.3.0")]
[assembly: AssemblyVersion("0.1.4.0")]
[assembly: AssemblyFileVersion("0.1.4.0")]

0 comments on commit 080c2f4

Please sign in to comment.