Skip to content

Commit

Permalink
Added default button
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-vantablack committed Dec 21, 2023
1 parent 4fc7f53 commit da34071
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions FunPlus MapTweaker/Form1.Designer.cs

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

16 changes: 16 additions & 0 deletions FunPlus MapTweaker/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,22 @@ private void button4_Click(object sender, EventArgs e)
UpdateValues();
}

private void button1_Click(object sender, EventArgs e)
{
string defaultPath = AppDomain.CurrentDomain.BaseDirectory + @"\default.json";
if (File.Exists(defaultPath))
{
var options = new JsonSerializerOptions
{
WriteIndented = true,
IncludeFields = true
};
string json = File.ReadAllText(defaultPath);
waves = JsonSerializer.Deserialize<List<CustomWave>>(json, options);
UpdateValues();
}
}

private void sceneTextBox_TextChanged(object sender, EventArgs e)
{
sceneName = sceneTextBox.Text;
Expand Down

0 comments on commit da34071

Please sign in to comment.