(0f1d327f0) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -241,26 +241,6 @@ namespace Barotrauma
|
||||
}
|
||||
#endif
|
||||
displayModeDD.OnSelected = (guiComponent, obj) =>
|
||||
{
|
||||
ToolTip = TextManager.Get("EnableVSyncToolTip"),
|
||||
OnSelected = (GUITickBox box) =>
|
||||
{
|
||||
VSyncEnabled = box.Selected;
|
||||
GameMain.GraphicsDeviceManager.SynchronizeWithVerticalRetrace = VSyncEnabled;
|
||||
GameMain.GraphicsDeviceManager.ApplyChanges();
|
||||
UnsavedSettings = true;
|
||||
|
||||
return true;
|
||||
},
|
||||
Selected = VSyncEnabled
|
||||
};
|
||||
|
||||
//TODO: remove hardcoded texts after the texts have been added to localization
|
||||
GUITickBox pauseOnFocusLostBox = new GUITickBox(new RectTransform(new Point(32, 32), leftColumn.RectTransform),
|
||||
TextManager.Get("PauseOnFocusLost", returnNull: true) ?? "Pause on focus lost");
|
||||
pauseOnFocusLostBox.Selected = PauseOnFocusLost;
|
||||
pauseOnFocusLostBox.ToolTip = TextManager.Get("PauseOnFocusLostToolTip", returnNull: true) ?? "Pauses the game when its window is not in focus. Note that the game won't be paused when a multiplayer session is active.";
|
||||
pauseOnFocusLostBox.OnSelected = (tickBox) =>
|
||||
{
|
||||
PauseOnFocusLost = tickBox.Selected;
|
||||
UnsavedSettings = true;
|
||||
|
||||
@@ -217,6 +217,22 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool RefreshJoinButtonState(GUIComponent component, object obj)
|
||||
{
|
||||
if (obj == null || waitingForRefresh) { return false; }
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text))
|
||||
{
|
||||
joinButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
joinButton.Enabled = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool SelectServer(GUIComponent component, object obj)
|
||||
{
|
||||
if (obj == null || waitingForRefresh || (!(obj is ServerInfo))) { return false; }
|
||||
@@ -557,10 +573,6 @@ namespace Barotrauma
|
||||
new GUIMessageBox(TextManager.Get("MasterServerErrorLabel"),
|
||||
TextManager.Get("MasterServerErrorUnavailable"));
|
||||
break;
|
||||
case System.Net.HttpStatusCode.ServiceUnavailable:
|
||||
new GUIMessageBox(TextManager.Get("MasterServerErrorLabel"),
|
||||
TextManager.Get("MasterServerErrorUnavailable"));
|
||||
break;
|
||||
default:
|
||||
new GUIMessageBox(TextManager.Get("MasterServerErrorLabel"),
|
||||
TextManager.GetWithVariables("MasterServerErrorDefault", new string[2] { "[statuscode]", "[statusdescription]" },
|
||||
|
||||
Reference in New Issue
Block a user