This commit is contained in:
MarcEricMartel
2023-06-11 11:59:19 -04:00
parent 166966df54
commit 788964b128
4 changed files with 153 additions and 139 deletions

View File

@@ -12,6 +12,9 @@ public partial class start_game_menu : Control {
private LineEdit _ip;
private Label _error, _lip;
[Export]
private AudioStreamPlayer _sndBtn, _sndState;
private string Error { set { _error.Set("text", value); } }
private string IP_address {
set {
@@ -24,6 +27,7 @@ public partial class start_game_menu : Control {
if (value == _currState)
return;
IP_address = "";
_sndState.Play();
switch (value) {
case _state.START:
Error = "";
@@ -117,12 +121,12 @@ public partial class start_game_menu : Control {
_single.Pressed += () => startGame(_gameType.SINGLE);
//_localMulti.Pressed += () => startGame(_gameType.LOCAL);
//_LANMulti.Pressed += () => State = _state.LAN;
_host.Pressed += () => setupLANMultiGame();
_join.Pressed += () => setupLANMultiGame(false);
_quit.Pressed += () => State = _state.QUIT;
_cancel.Pressed += () => State = _state.START;
_no.Pressed += () => State = _state.START;
_yes.Pressed += () => GetTree().Quit();
_host.Pressed += () => { _sndBtn.Play(); setupLANMultiGame();};
_join.Pressed += () => { _sndBtn.Play(); setupLANMultiGame(false);};
_quit.Pressed += () => { _sndBtn.Play(); State = _state.QUIT;};
_cancel.Pressed += () => { _sndBtn.Play(); State = _state.START;};
_no.Pressed += () => { _sndBtn.Play(); State = _state.START;};
_yes.Pressed += () => { _sndBtn.Play(); GetTree().Quit();};
State = _state.START;
}