- AI equips a diving suit before going out

- placing a firesource outside any hull won't crash the game
- scrollbars aren't gray
- fixed client crashing if in the lobby when a round ends
- fixed password box crashing
This commit is contained in:
Regalis
2016-01-25 18:47:19 +02:00
parent 89405d786b
commit 08daab9d87
12 changed files with 177 additions and 48 deletions
+16 -3
View File
@@ -302,15 +302,28 @@ namespace Barotrauma
if (serverList.Selected!=null && (serverList.Selected.GetChild("password") as GUITickBox).Selected)
{
var msgBox = new GUIMessageBox("Password required:", "");
var passwordBox = new GUITextBox(new Rectangle(0,40,150,25), Alignment.TopLeft, GUI.Style, msgBox);
var msgBox = new GUIMessageBox("Password required:", "", new string[] { "OK", "Cancel" });
var passwordBox = new GUITextBox(new Rectangle(0,40,150,25), Alignment.TopLeft, GUI.Style, msgBox.children[0]);
passwordBox.UserData = "password";
var okButton = msgBox.GetChild<GUIButton>();
var okButton = msgBox.Buttons[0];
var cancelButton = msgBox.Buttons[1];
while (GUIMessageBox.MessageBoxes.Contains(msgBox))
{
okButton.Enabled = !string.IsNullOrWhiteSpace(passwordBox.Text);
if (okButton.Selected)
{
msgBox.Close(null,null);
break;
}
else if (cancelButton.Selected)
{
msgBox.Close(null, null);
yield return CoroutineStatus.Success;
}
yield return CoroutineStatus.Running;
}