private static void StartGame() { Main.PlaySound(10); string text = WorldSelect.WorldName(); if (text == null) { UI.main.SetMenu(MenuMode.WORLD_SIZE); return; } UI.main.SetMenu(MenuMode.STATUS_SCREEN); Main.worldName = text; WorldGen.playWorld(); }
public static void Draw(WorldView view) { Rectangle rect = default(Rectangle); rect.X = (view.viewWidth >> 1) - 190; rect.Y = 210; rect.Width = 380; rect.Height = 168; Main.DrawRect(451, rect, 64); Color c = Color.White; int num = (view.viewWidth >> 1) - 100; int num2 = 230; bool flag = UI.main.CanPlayOnline(); if (cursorY == 0) { view.ui.DrawInventoryCursor(num, num2, 1.0); } else { c = (flag ? Color.White : new Color(128, 128, 128, 255)); SpriteSheet <_sheetSprites> .Draw(451, num, num2, c); } if (UI.main.isOnline) { SpriteSheet <_sheetSprites> .Draw(202, num + 10, num2 + 10, c); } UI.DrawStringLC(UI.fontSmall, Lang.menu[6], num + 60, num2 + 26, c); num2 += 64; if (cursorY == 1) { view.ui.DrawInventoryCursor(num, num2, 1.0); } else { c = ((flag && UI.main.isOnline) ? Color.White : new Color(128, 128, 128, 255)); SpriteSheet <_sheetSprites> .Draw(451, num, num2, c); } if (UI.main.isInviteOnly) { SpriteSheet <_sheetSprites> .Draw(202, num + 10, num2 + 10, c); } UI.DrawStringLC(UI.fontSmall, Lang.menu[7], num + 60, num2 + 26, c); string text = (WorldSelect.WorldName() != null) ? Lang.menu[10] : Lang.menu[11]; float num3 = 1f; if (cursorY != 2) { c = new Color(240, 240, 240, 240); } else { num3 *= 1f + UI.cursorAlpha * 0.1f; c = new Color(UI.cursorColor.A, UI.cursorColor.A, 100, 255); } Vector2 pivot = UI.MeasureString(UI.fontBig, text); pivot.X *= 0.5f; pivot.Y *= 0.5f; UI.DrawStringScaled(pos: new Vector2(view.viewWidth >> 1, 454f), font: UI.fontBig, s: text, c: c, pivot: pivot, scale: num3); }