(bf3994d49) Fixed save time being displayed in UNIX time in the right-hand panel in the campaign setup UI
This commit is contained in:
@@ -429,6 +429,12 @@ namespace Barotrauma
|
|||||||
|
|
||||||
string subName = doc.Root.GetAttributeString("submarine", "");
|
string subName = doc.Root.GetAttributeString("submarine", "");
|
||||||
string saveTime = doc.Root.GetAttributeString("savetime", "unknown");
|
string saveTime = doc.Root.GetAttributeString("savetime", "unknown");
|
||||||
|
if (long.TryParse(saveTime, out long unixTime))
|
||||||
|
{
|
||||||
|
DateTime time = ToolBox.Epoch.ToDateTime(unixTime);
|
||||||
|
saveTime = time.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
string mapseed = doc.Root.GetAttributeString("mapseed", "unknown");
|
string mapseed = doc.Root.GetAttributeString("mapseed", "unknown");
|
||||||
|
|
||||||
var saveFileFrame = new GUIFrame(new RectTransform(new Vector2(0.45f, 0.6f), loadGameContainer.RectTransform, Anchor.TopRight)
|
var saveFileFrame = new GUIFrame(new RectTransform(new Vector2(0.45f, 0.6f), loadGameContainer.RectTransform, Anchor.TopRight)
|
||||||
|
|||||||
@@ -218,6 +218,22 @@ namespace Barotrauma
|
|||||||
return true;
|
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)
|
private bool SelectServer(GUIComponent component, object obj)
|
||||||
{
|
{
|
||||||
if (obj == null || waitingForRefresh) { return false; }
|
if (obj == null || waitingForRefresh) { return false; }
|
||||||
|
|||||||
Reference in New Issue
Block a user