示例#1
0
        private void LoadUI()
        {
            filterHoverUI = new FilterHoverUI();
            filterHoverUI.Activate();

            interfaceLayer = new LegacyGameInterfaceLayer("MechTransfer: UI",
                                                          delegate
            {
                filterHoverUI.Draw(Main.spriteBatch);
                return(true);
            },
                                                          InterfaceScaleType.UI);
        }
示例#2
0
        ////

        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);
        }
示例#3
0
        ////////////////

        public virtual bool AllowInterfaceLayer(GameInterfaceLayer layer)
        {
            return(false);
        }