2.10.9: beta notice in the MSCO menu and the in-game status bar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -2725,12 +2725,22 @@ namespace MSCO
|
||||
InputLock.Set(overlays.AnyOpen && MenuHelper.InGame);
|
||||
}
|
||||
|
||||
string hudText;
|
||||
int hudTextKey;
|
||||
|
||||
void DrawHud()
|
||||
{
|
||||
// Statuszeile oben in der Mitte (links oben ist die Spielanzeige)
|
||||
string state = IsFullyConnected ? "CONNECTED" : IsPeerReady ? "SYNCING..." : "WAITING";
|
||||
string text = "MSCO • " + state + " • " + (dedicated ? "Server" : IsHost ? "Host" : "Client") + " • " +
|
||||
// Text nur neu bauen, wenn sich etwas geändert hat (nicht jedes Frame neue Strings)
|
||||
int key = (state.Length * 31 + players.Count) * 100003 + objects.Count + (dedicated ? 7 : IsHost ? 3 : 1) * 1000000007;
|
||||
if (hudText == null || key != hudTextKey)
|
||||
{
|
||||
hudTextKey = key;
|
||||
hudText = "MSCO BETA • " + state + " • " + (dedicated ? "Server" : IsHost ? "Host" : "Client") + " • " +
|
||||
players.Count + " player(s) • " + objects.Count + " synced objects";
|
||||
}
|
||||
string text = hudText;
|
||||
var rect = new Rect((Screen.width - 520) / 2f, 6, 520, 24);
|
||||
if (hudBox == null) hudBox = UiTheme.Panel9(new Color(0.06f, 0.06f, 0.07f, 0.85f), 8);
|
||||
GUI.Box(rect, GUIContent.none, hudBox);
|
||||
|
||||
Reference in New Issue
Block a user