Skip to content

Commit

Permalink
Same version, more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
David-JonesDVN committed Feb 11, 2019
1 parent e9e883e commit d4944e1
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 23 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
0.8 (02/11/2019)
Added: Actual launch code for PC-98 games (How did I forget that).
Added: Drag/Drop support for game configuration.
Added: Drag/Drop support for game configuration
Changed: Launching PC-98 games now simply replaces the hdi directory instead of the entire ini file.
Changed: Invalid textboxes turn red instead of giving you a message box/not doing anything.
Fixed: PC-98 games not saving their status immediately.
Fixed: Manually adding banners now checks if the image is valid/openable.

Expand Down
28 changes: 14 additions & 14 deletions Touhou Launcher/ConfigForm.Designer.cs

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

12 changes: 10 additions & 2 deletions Touhou Launcher/ConfigForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ private void Dir_LostFocus(object sender, EventArgs e)
{
if (File.Exists(((TextBox)sender).Text) || ((TextBox)sender).Text == "")
{
((TextBox)sender).BackColor = SystemColors.Window;
int dirID = game > 4 ? MainForm.dirToNumber[((TextBox)sender).Name.Replace("Dir", "")] : 0;
MainForm.curCfg.gameCFG[game].GameDir[dirID] = ((TextBox)sender).Text;
}
else
{
((TextBox)sender).BackColor = Color.Red;
}
}

private void Dir_DragEnter(object sender, DragEventArgs e)
Expand Down Expand Up @@ -208,7 +213,7 @@ private void launch_Click(object sender, EventArgs e)
}
else
{
MessageBox.Show(MainForm.rm.GetString("errorFileNotFound"));
MessageBox.Show(MainForm.rm.GetString("errorGameNotFound"));
}
}

Expand Down Expand Up @@ -266,13 +271,16 @@ private void bannerDir_LostFocus(object sender, EventArgs e)
}
catch (OutOfMemoryException ex)
{

MessageBox.Show(MainForm.rm.GetString("errorOpenImage") + ex);
}
catch (FileNotFoundException ex)
{
MessageBox.Show(MainForm.rm.GetString("errorFileNotFound"));
((TextBox)sender).BackColor = Color.Red;
}
}
else
((TextBox)sender).BackColor = SystemColors.Window;
}

private void browseHDI_Click(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion Touhou Launcher/MainForm.Designer.cs

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

6 changes: 5 additions & 1 deletion Touhou Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private void btn_Click(object sender, EventArgs e)
Application.Exit();
}
else
MessageBox.Show("Cannot find game.");
MessageBox.Show(rm.GetString("errorGameNotFound"));
}

private void customAdd_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -609,6 +609,7 @@ private void browseNP2_Click(object sender, EventArgs e)
{
foreach (string file in MainForm.FileBrowser(MainForm.rm.GetString("np2SelectTitle"), MainForm.rm.GetString("executableFilter") + " (*.exe, *.bat, *.lnk)|*.exe;*.bat;*.lnk|" + MainForm.rm.GetString("allFilter") + " (*.*)|*.*"))
{
np2Dir.BackColor = SystemColors.Window;
np2Dir.Text = file;
MainForm.curCfg.np2Dir = file;
}
Expand All @@ -618,8 +619,11 @@ private void np2Dir_LostFocus(object sender, EventArgs e)
{
if (File.Exists(np2Dir.Text) || np2Dir.Text == "")
{
((TextBox)sender).BackColor = SystemColors.Window;
MainForm.curCfg.np2Dir = np2Dir.Text;
}
else
((TextBox)sender).BackColor = Color.Red;
}

private void autoClose_CheckedChanged(object sender, EventArgs e)
Expand Down
11 changes: 10 additions & 1 deletion Touhou Launcher/Resources_en.Designer.cs

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

5 changes: 4 additions & 1 deletion Touhou Launcher/Resources_en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ random game option</value>
<value>Please set Neko Project 2's location</value>
</data>
<data name="errorOpenImage" xml:space="preserve">
<value>Cannot openfile as image:\n</value>
<value>Cannot open file as image:\n</value>
</data>
<data name="errorReplaysNotFound" xml:space="preserve">
<value>Cannot find Replays folder</value>
Expand Down Expand Up @@ -589,4 +589,7 @@ random game option</value>
<data name="errorInvalidNP2INI" xml:space="preserve">
<value>Neko Project II's configuration ini is not valid.</value>
</data>
<data name="errorGameNotFound" xml:space="preserve">
<value>Cannot find game</value>
</data>
</root>
11 changes: 10 additions & 1 deletion Touhou Launcher/Resources_jp.Designer.cs

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

5 changes: 4 additions & 1 deletion Touhou Launcher/Resources_jp.resx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ random game option</value>
<value>Please set Neko Project 2's location</value>
</data>
<data name="errorOpenImage" xml:space="preserve">
<value>Cannot openfile as image:\n</value>
<value>Cannot open file as image:\n</value>
</data>
<data name="errorReplaysNotFound" xml:space="preserve">
<value>Cannot find Replays folder</value>
Expand Down Expand Up @@ -589,4 +589,7 @@ random game option</value>
<data name="errorInvalidNP2INI" xml:space="preserve">
<value>Neko Project II's configuration ini is not valid.</value>
</data>
<data name="errorGameNotFound" xml:space="preserve">
<value>Cannot find game</value>
</data>
</root>

0 comments on commit d4944e1

Please sign in to comment.