private void OnGUIHost()
{
int offsetY = this.m_OffsetY;
GUI.Label(new Rect((float) this.m_OffsetX, (float) offsetY, 200f, 40f), "Host Was Shutdown ID(" + this.m_OldServerConnectionId + ")");
offsetY += 0x19;
if (Application.platform == RuntimePlatform.WebGLPlayer)
{
GUI.Label(new Rect((float) this.m_OffsetX, (float) offsetY, 200f, 40f), "Host Migration not supported for WebGL");
}
else
{
if (this.m_WaitingReconnectToNewHost)
{
if (GUI.Button(new Rect((float) this.m_OffsetX, (float) offsetY, 200f, 20f), "Reconnect as Client"))
{
this.Reset(0);
if (NetworkManager.singleton != null)
{
NetworkManager.singleton.networkAddress = GUI.TextField(new Rect((float) (this.m_OffsetX + 100), (float) offsetY, 95f, 20f), NetworkManager.singleton.networkAddress);
NetworkManager.singleton.StartClient();
}
else
{
Debug.LogWarning("MigrationManager Old Host Reconnect - No NetworkManager.");
}
}
offsetY += 0x19;
}
else
{
bool flag;
if (GUI.Button(new Rect((float) this.m_OffsetX, (float) offsetY, 200f, 20f), "Pick New Host") && this.FindNewHost(out this.m_NewHostInfo, out flag))
{
this.m_NewHostAddress = this.m_NewHostInfo.address;
if (flag)
{
Debug.LogWarning("MigrationManager FindNewHost - new host is self?");
}
else
{
this.m_WaitingReconnectToNewHost = true;
}
}
offsetY += 0x19;
}
if (GUI.Button(new Rect((float) this.m_OffsetX, (float) offsetY, 200f, 20f), "Leave Game"))
{
if (NetworkManager.singleton != null)
{
NetworkManager.singleton.SetupMigrationManager(null);
NetworkManager.singleton.StopHost();
}
else
{
Debug.LogWarning("MigrationManager Old Host LeaveGame - No NetworkManager.");
}
this.Reset(-1);
}
offsetY += 0x19;
}
}