Skip to content

Commit

Permalink
More dynamic control enabling/disabling, also allowed you to select a…
Browse files Browse the repository at this point in the history
… 1-player netgame for solonet play
  • Loading branch information
Kyle873 committed Mar 29, 2014
1 parent 206114b commit 11c80a1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
3 changes: 1 addition & 2 deletions Utilities/Doom RPG Launcher/FormMain.Designer.cs

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

51 changes: 32 additions & 19 deletions Utilities/Doom RPG Launcher/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace DoomRPG
{
public partial class FormMain : Form
{
Version version = new Version(0, 7, 0, 3);
Version version = new Version(0, 7, 0, 4);
Config config = new Config();

public FormMain()
Expand Down Expand Up @@ -51,7 +51,6 @@ public FormMain()
PopulateMods();

// send initial events to specific controls to refresh their states
checkBoxMultiplayer_CheckedChanged(null, null);
richTextBoxCredits_TextChanged(null, null);
}

Expand Down Expand Up @@ -465,23 +464,6 @@ private void buttonLaunch_MouseDown(object sender, MouseEventArgs e)
}
}

private void checkBoxMultiplayer_CheckedChanged(object sender, EventArgs e)
{
// Multiplayer Checkbox
if (checkBoxMultiplayer.Checked)
{
groupBoxMode.Enabled = true;
groupBoxServerMode.Enabled = true;
groupBoxServerOptions.Enabled = true;
}
else
{
groupBoxMode.Enabled = false;
groupBoxServerMode.Enabled = false;
groupBoxServerOptions.Enabled = false;
}
}

private void richTextBoxCredits_TextChanged(object sender, EventArgs e)
{
richTextBoxCredits.Find("Testers");
Expand Down Expand Up @@ -549,6 +531,37 @@ private void timer_Tick(object sender, EventArgs e)
comboBoxClass.Enabled = true;
else
comboBoxClass.Enabled = false;

// Multiplayer Checkbox
if (checkBoxMultiplayer.Checked)
{
groupBoxMode.Enabled = true;
groupBoxServerMode.Enabled = true;
if (radioButtonHosting.Checked)
{
numericUpDownPlayers.Enabled = true;
radioButtonPeerToPeer.Enabled = true;
radioButtonPacketServer.Enabled = true;
groupBoxServerOptions.Enabled = true;
}
else
{
numericUpDownPlayers.Enabled = false;
radioButtonPeerToPeer.Enabled = false;
radioButtonPacketServer.Enabled = false;
groupBoxServerOptions.Enabled = false;
}
if (radioButtonJoining.Checked)
textBoxHostname.Enabled = true;
else
textBoxHostname.Enabled = false;
}
else
{
groupBoxMode.Enabled = false;
groupBoxServerMode.Enabled = false;
groupBoxServerOptions.Enabled = false;
}
}
}
}

0 comments on commit 11c80a1

Please sign in to comment.