Beispiel #1
0
    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);
    }
Beispiel #2
0
        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");
        }
Beispiel #3
0
 public UIServerList()
 {
     instanse = this;
 }