Update MenuManager.cs

This commit is contained in:
JohnCorby 2022-02-05 23:01:02 -08:00
parent ec0ec118e2
commit 06d178a9b7

View File

@ -301,6 +301,7 @@ namespace QSB.Menus
private void Disconnect() private void Disconnect()
{ {
_intentionalDisconnect = true; _intentionalDisconnect = true;
QSBNetworkManager.singleton.StopHost(); QSBNetworkManager.singleton.StopHost();
SetButtonActive(DisconnectButton.gameObject, false); SetButtonActive(DisconnectButton.gameObject, false);
@ -314,6 +315,8 @@ namespace QSB.Menus
private void Host() private void Host()
{ {
_intentionalDisconnect = false;
SetButtonActive(DisconnectButton, true); SetButtonActive(DisconnectButton, true);
SetButtonActive(HostButton, false); SetButtonActive(HostButton, false);
SetButtonActive(QuitButton, false); SetButtonActive(QuitButton, false);
@ -346,6 +349,8 @@ namespace QSB.Menus
private void Connect() private void Connect()
{ {
_intentionalDisconnect = false;
var address = ((PopupInputMenu)IPPopup).GetInputText(); var address = ((PopupInputMenu)IPPopup).GetInputText();
if (address == string.Empty) if (address == string.Empty)
{ {
@ -412,6 +417,7 @@ namespace QSB.Menus
{ {
if (_intentionalDisconnect) if (_intentionalDisconnect)
{ {
DebugLog.DebugWrite("intentional disconnect. dont show popup");
_intentionalDisconnect = false; _intentionalDisconnect = false;
return; return;
} }