public static void Draw(WorldView view) { Rectangle rect = default(Rectangle); Color white = Color.White; rect.X = view.SAFE_AREA_OFFSET_L; rect.Y = view.SAFE_AREA_OFFSET_T; rect.Width = 416; rect.Height = 446; Main.DrawRect(451, rect, 64); rect.X += 448; Main.DrawRect(451, rect, 64); UI.DrawStringCC(UI.fontBig, Lang.menu[83], view.SAFE_AREA_OFFSET_L + (rect.Width >> 1), rect.Y + 32, white); UI.DrawStringCC(UI.fontBig, Lang.menu[84], rect.Center.X, rect.Y + 32, white); int count = Netplay.availableSessions.Count; if (count == 0) { UI.DrawStringCC(s: (!Netplay.IsFindingSessions()) ? Lang.menu[77] : Lang.menu[76], font: UI.fontSmall, x: rect.Center.X, y: rect.Center.Y, c: UI.mouseTextColor); } else { rect.X += 8; rect.Y += 80; rect.Width = 400; rect.Height = 24; int num = Math.Min(count, sessionListTop + 8); lock (Netplay.availableSessions) { for (int i = sessionListTop; i < num; i++) { int texId = 450; int alpha = 255; if (i == selectedSession && cursorX == 1) { alpha = UI.mouseTextBrightness; texId = 448; } Main.DrawRect(texId, rect, alpha); rect.Y += 48; } rect.Y -= 48 * Math.Min(count, 8); white = Color.White; for (int j = sessionListTop; j < num; j++) { JoinableSession joinableSession = Netplay.availableSessions[j]; string s2 = (j + 1).ToStringLookup() + "."; UI.DrawStringLC(UI.fontSmallOutline, s2, rect.X, rect.Center.Y, white); UI.DrawStringLC(UI.fontSmallOutline, joinableSession.host, rect.X + 32, rect.Center.Y, white); s2 = Lang.menu[78] + joinableSession.players.ToStringLookup() + "/8"; UI.DrawStringRC(UI.fontSmallOutline, s2, rect.Right, rect.Center.Y, white); rect.Y += 48; } } } rect.X = view.SAFE_AREA_OFFSET_L + 8; rect.Y = view.SAFE_AREA_OFFSET_T + 80; rect.Width = 400; rect.Height = 24; for (int k = 0; k < 8; k++) { int texId2 = 450; int alpha2 = 255; if (k == selectedWorld && cursorX == 0) { alpha2 = UI.mouseTextBrightness; texId2 = 448; } else if (worldNames[k] == null) { alpha2 = 212; texId2 = 451; } Main.DrawRect(texId2, rect, alpha2); rect.Y += 48; } rect.Y -= 384; for (int l = 0; l < 8; l++) { string s3 = (worldNames[l] == null) ? Lang.menu[79] : worldNames[l]; white = ((worldNames[l] == null) ? new Color(200, 200, 220, 255) : new Color(255, 255, 255, 255)); UI.DrawStringCC(UI.fontSmallOutline, s3, rect.Center.X, rect.Center.Y, white); rect.Y += 48; } }