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 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); }
public override void OnInitialize() { InputTexture = new ScalableTexture2D(ModContent.GetTexture("DaeLib/PanelOutset"), 6); MinWidth = StyleDimension.Fill; Height.Set(DEFAULT_HEIGHT, 0); }
public override void OnInitialize() { CheckboxTexture = new ScalableTexture2D(ModContent.GetTexture("DaeLib/PanelOutset"), 6); }