static public UIServerList GetInstance() { UIServerList self = UIManager.Singleton.GetUIWithoutLoad <UIServerList>(); if (self != null) { return(self); } self = UIManager.Singleton.LoadUI <UIServerList>("UI/UIServerList", UIManager.Anchor.Center); return(self); }
public override void Load() { if (Main.dedServ) { return; } // Add hooks IL.Terraria.Main.DrawMenu += Hooks.Main_DrawMenu; IL.Terraria.Netplay.ClientLoopSetup += Hooks.NetPlay_ClientLoopSetup; // TODO: IL Hook into NetPlay.ClientLoopSetup // Create our serverlist state ServerListUI = new UIServerList(); ServerEditorUI = new UIServerEditor(); PasswordPromptUI = new UIPasswordPrompt(); // Load textures for draw helper PanelTexture = new ScalableTexture2D(GetTexture("RichPanel"), 6); ConfigButtonTexture = GetTexture("ButtonConfig"); }
public UIServerList() { instanse = this; }