private void LoadUI() { filterHoverUI = new FilterHoverUI(); filterHoverUI.Activate(); interfaceLayer = new LegacyGameInterfaceLayer("MechTransfer: UI", delegate { filterHoverUI.Draw(Main.spriteBatch); return(true); }, InterfaceScaleType.UI); }
//// public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int barsIdx = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Resource Bars")); if (barsIdx == -1) { return; } int npcChatIdx = layers.FindIndex(layer => layer.Name.Equals("Vanilla: NPC / Sign Dialog")); if (npcChatIdx == -1) { return; } int topIdx = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Over")); if (topIdx == -1) { return; } // var particleLayer = new LegacyGameInterfaceLayer( "Necrotis: UI Particles", () => { CustomParticle.DrawParticles(Main.spriteBatch, false); return(true); }, InterfaceScaleType.UI ); /*var hoverLayer = new LegacyGameInterfaceLayer( * "Necrotis: Ankh Hover Tooltip", * drawAnkhHoverTip, * InterfaceScaleType.UI * );*/ GameInterfaceLayer npcButtonWDLayer = this.GetInterfaceLayer_NpcChatButton_WitchDoctor_HealNecrotis(); // layers.Add(particleLayer); //barsIdx + 1 //layers.Insert( topIdx + 1, hoverLayer ); layers.Insert(npcChatIdx + 1, npcButtonWDLayer); }
//////////////// public virtual bool AllowInterfaceLayer(GameInterfaceLayer layer) { return(false); }