예제 #1
0
        public HeroHudImage(string name)
        {
            this.HeroSprite = new Render.Sprite(ImageLoader.Load(name), new Vector2(0, 0))
            {
                Scale            = new Vector2(0.38f, 0.38f),
                Visible          = true,
                VisibleCondition = delegate { return(HudVariables.ShouldBeVisible); },
            };

            this.SSSprite = new Render.Sprite(Resources.SSCircle, new Vector2(0, 0))
            {
                Scale   = new Vector2(0.38f, 0.38f),
                Visible = true,
            };

            this.SSText = new Render.Text(new Vector2(0, 0), "", 26, SharpDX.Color.White)
            {
                Visible  = true,
                Centered = true
            };

            //image.GrayScale();
            HeroSprite.Add(1);
            SSSprite.Add(2);
            SSText.Add(3);
        }
예제 #2
0
        public HeroHudImage(string name)
        {
            this.HeroSprite = new Render.Sprite(ImageLoader.Load(name), new Vector2(0, 0))
            {
                Scale            = new Vector2(0.38f, 0.38f),
                Visible          = true,
                VisibleCondition = delegate { return(HudVariables.ShouldBeVisible); },
            };

            this.SSSprite = new Render.Sprite(Resources.SSCircle, new Vector2(0, 0))
            {
                Scale            = new Vector2(0.38f, 0.38f),
                Visible          = true,
                VisibleCondition = delegate
                {
                    var heroTracker =
                        SSTrackerModule.Trackers.Values.FirstOrDefault(h => h.Hero.ChampionName.ToLower().Equals(name.ToLower()));
                    if (heroTracker != null)
                    {
                        return(HudVariables.ShouldBeVisible && MenuExtensions.GetItemValue <bool>("dz191.dza.sstracker.hud") && heroTracker.SSTimeFloat >= Variables.MinSSTime);
                    }
                    return(false);
                },
            };

            this.SSText = new Render.Text(new Vector2(0, 0), "", 26, SharpDX.Color.White)
            {
                Visible    = true,
                TextUpdate = delegate
                {
                    var heroTracker =
                        SSTrackerModule.Trackers.Values.FirstOrDefault(h => h.Hero.ChampionName.ToLower().Equals(name.ToLower()));
                    return(heroTracker != null ? heroTracker.SSTime : string.Empty);
                },
                VisibleCondition = delegate
                {
                    var heroTracker =
                        SSTrackerModule.Trackers.Values.FirstOrDefault(h => h.Hero.ChampionName.ToLower().Equals(name.ToLower()));
                    if (heroTracker != null)
                    {
                        return(HudVariables.ShouldBeVisible && MenuExtensions.GetItemValue <bool>("dz191.dza.sstracker.hud") && heroTracker.SSTimeFloat >= Variables.MinSSTime);
                    }

                    return(false);
                },
                Centered = true
            };

            //image.GrayScale();
            HeroSprite.Add(1);
            SSSprite.Add(2);
            SSText.Add(3);
        }