Пример #1
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");
        }
Пример #2
0
        public override void Load()
        {
            IL.Terraria.Player.HasAmmo  += Hook.HasAmmo;
            IL.Terraria.Player.PickAmmo += Hook.PickAmmo;
            IL.Terraria.UI.ItemSlot.Draw_SpriteBatch_ItemArray_int_int_Vector2_Color += Hook.ItemSlotDraw;

            if (Main.dedServ)
            {
                return;
            }

            if (SmallItemSlotTexture == null)
            {
                SmallItemSlotTexture = new ScalableTexture2D(GetTexture("InventoryBackSmall"), 4);
            }

            // Create Gnome Reforge Interface

            EndlessAmmoUIInstance    = new EndlessAmmoUI();
            EndlessAmmoUserInterface = new UserInterface();
            EndlessAmmoUserInterface.SetState(EndlessAmmoUIInstance);
        }
Пример #3
0
 public override void OnInitialize()
 {
     InputTexture = new ScalableTexture2D(ModContent.GetTexture("DaeLib/PanelOutset"), 6);
     MinWidth     = StyleDimension.Fill;
     Height.Set(DEFAULT_HEIGHT, 0);
 }
Пример #4
0
 public override void OnInitialize()
 {
     CheckboxTexture = new ScalableTexture2D(ModContent.GetTexture("DaeLib/PanelOutset"), 6);
 }