Beispiel #1
0
 public VsFrame(string uId, Color defaultValue) : base(uId, "", 265)
 {
     ImageSprite = new Sprite(
         Texture.FromMemory(
             Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Properties.Resources.Img_Nasus, typeof(byte[])),
             156, 169, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Dither, 10));
 }
Beispiel #2
0
        public WardPreview(string uId, Color defaultValue) : base(uId, "", 265)
        {
            ImageSprite = new Sprite(
                Texture.FromMemory(
                    Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Properties.Resources.WardList, typeof(byte[])),
                    710, 574, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 10));

            WardAtlas = JsonConvert.DeserializeObject <WardAtlass>(Properties.Resources.WardPosition);
        }
        public static void Initialize()
        {
            Program.BaseUltMenu["x"].Cast<Slider>().OnValueChange += Offset_OnValueChange;
            Program.BaseUltMenu["y"].Cast<Slider>().OnValueChange += Offset_OnValueChange;
            UpdateOffset(Program.BaseUltMenu["x"].Cast<Slider>().CurrentValue,
                Program.BaseUltMenu["y"].Cast<Slider>().CurrentValue);

            Text = new Font("", new FontDescription
            {
                FaceName = "Calibri",
                Height = (Height/30)*23,
                OutputPrecision = FontPrecision.Default,
                Quality = FontQuality.ClearType
            });

            Hud =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                    (byte[]) new ImageConverter().ConvertTo(Resources.baseulthud, typeof (byte[])), 285, 44, 0,
                    Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Bar =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                    (byte[]) new ImageConverter().ConvertTo(Resources.bar, typeof (byte[])), 260, 66, 0, Usage.None,
                    Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Warning =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                    (byte[]) new ImageConverter().ConvertTo(Resources.warning, typeof (byte[])), 40, 40, 0, Usage.None,
                    Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Underline =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                    (byte[]) new ImageConverter().ConvertTo(Resources.underline_red, typeof (byte[])), 355, 89, 0,
                    Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            foreach (var hero in ObjectManager.Get<AIHeroClient>())
            {
                Recalls.Add(new Recall(hero, RecallStatus.Inactive));
            }

            #region Spells

            BaseUltSpells.Add(new BaseUltSpell("Ezreal", SpellSlot.R, 1000, 2000, 160, false));
            BaseUltSpells.Add(new BaseUltSpell("Jinx", SpellSlot.R, 600, 1700, 140, true));
            BaseUltSpells.Add(new BaseUltSpell("Ashe", SpellSlot.R, 250, 1600, 130, true));
            BaseUltSpells.Add(new BaseUltSpell("Draven", SpellSlot.R, 400, 2000, 160, true));
            BaseUltSpells.Add(new BaseUltSpell("Karthus", SpellSlot.R, 3125, 0, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Ziggs", SpellSlot.Q, 250, 3100, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Lux", SpellSlot.R, 1375, 0, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Xerath", SpellSlot.R, 700, 600, 0, false));

            #endregion
        }
        public static void Initialize()
        {
            Program.BaseUltMenu["x"].Cast <Slider>().OnValueChange += Offset_OnValueChange;
            Program.BaseUltMenu["y"].Cast <Slider>().OnValueChange += Offset_OnValueChange;
            UpdateOffset(Program.BaseUltMenu["x"].Cast <Slider>().CurrentValue,
                         Program.BaseUltMenu["y"].Cast <Slider>().CurrentValue);

            Text = new Font("", new FontDescription
            {
                FaceName        = "Calibri",
                Height          = (Height / 30) * 23,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            Hud =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                                              (byte[])new ImageConverter().ConvertTo(Resources.baseulthud, typeof(byte[])), 285, 44, 0,
                                              Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Bar =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                                              (byte[])new ImageConverter().ConvertTo(Resources.bar, typeof(byte[])), 260, 66, 0, Usage.None,
                                              Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Warning =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                                              (byte[])new ImageConverter().ConvertTo(Resources.warning, typeof(byte[])), 40, 40, 0, Usage.None,
                                              Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            Underline =
                new Sprite(Texture.FromMemory(Drawing.Direct3DDevice,
                                              (byte[])new ImageConverter().ConvertTo(Resources.underline_red, typeof(byte[])), 355, 89, 0,
                                              Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0));

            foreach (var hero in ObjectManager.Get <AIHeroClient>())
            {
                Recalls.Add(new Recall(hero, RecallStatus.Inactive));
            }

            #region Spells

            BaseUltSpells.Add(new BaseUltSpell("Ezreal", SpellSlot.R, 1000, 2000, 160, false));
            BaseUltSpells.Add(new BaseUltSpell("Jinx", SpellSlot.R, 600, 1700, 140, true));
            BaseUltSpells.Add(new BaseUltSpell("Ashe", SpellSlot.R, 250, 1600, 130, true));
            BaseUltSpells.Add(new BaseUltSpell("Draven", SpellSlot.R, 400, 2000, 160, true));
            BaseUltSpells.Add(new BaseUltSpell("Karthus", SpellSlot.R, 3125, 0, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Ziggs", SpellSlot.Q, 250, 3100, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Lux", SpellSlot.R, 1375, 0, 0, false));
            BaseUltSpells.Add(new BaseUltSpell("Xerath", SpellSlot.R, 700, 600, 0, false));

            #endregion
        }
Beispiel #5
0
 public SpriteSlot(Sprite Rdyspr, Sprite NRspr, SpellSlot slot)
 {
     this.ReadySprite    = Rdyspr;
     this.NotReadySprite = NRspr;
     this.Slot           = slot;
 }
Beispiel #6
0
        public ChampionTexture(AIHeroClient Champion, List <SharpDX.Direct3D9.Texture> Texture, List <Image> Images, Sprite hp, Sprite mp, Sprite xp, Sprite emp, Sprite recall, Sprite teleport)
        {
            this.Hero = Champion;

            var Texturearry = Texture.ToArray();
            var imagesarray = Images.ToArray();

            this.HeroIcon = new Sprite(Texturearry[0])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[0].Width, imagesarray[0].Height)
            };

            this.HeroIconDead = new Sprite(Texturearry[1])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[1].Width, imagesarray[1].Height)
            };

            var q = new Sprite(Texturearry[2])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[2].Width, imagesarray[2].Height)
            };
            var qnr = new Sprite(Texturearry[3])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[3].Width, imagesarray[3].Height)
            };

            this.Q = new SpriteSlot(q, qnr, SpellSlot.Q);

            var w = new Sprite(Texturearry[4])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[4].Width, imagesarray[4].Height)
            };
            var wnr = new Sprite(Texturearry[5])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[5].Width, imagesarray[5].Height)
            };

            this.W = new SpriteSlot(w, wnr, SpellSlot.W);

            var e = new Sprite(Texturearry[6])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[6].Width, imagesarray[6].Height)
            };
            var enr = new Sprite(Texturearry[7])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[7].Width, imagesarray[7].Height)
            };

            this.E = new SpriteSlot(e, enr, SpellSlot.E);

            var r = new Sprite(Texturearry[8])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[8].Width, imagesarray[8].Height)
            };
            var rnr = new Sprite(Texturearry[9])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[9].Width, imagesarray[9].Height)
            };

            this.R = new SpriteSlot(r, rnr, SpellSlot.R);

            var sum1 = new Sprite(Texturearry[10])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[10].Width, imagesarray[10].Height)
            };
            var sum1nr = new Sprite(Texturearry[11])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[11].Width, imagesarray[11].Height)
            };

            this.Summoner1 = new SpriteSlot(sum1, sum1nr, SpellSlot.Summoner1);

            var sum2 = new Sprite(Texturearry[12])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[12].Width, imagesarray[12].Height)
            };
            var sum2nr = new Sprite(Texturearry[13])
            {
                Rectangle = new Rectangle(0, 0, imagesarray[13].Width, imagesarray[13].Height)
            };

            this.Summoner2 = new SpriteSlot(sum2, sum2nr, SpellSlot.Summoner2);

            int barwidth  = imagesarray[2].Width + imagesarray[0].Width;
            int barheight = (int)(imagesarray[0].Height * 0.07);

            this.HPBar = new Sprite(() => hp.Texture)
            {
                Rectangle = new Rectangle(0, 0, barwidth, barheight)
            };
            this.MPBar = new Sprite(() => mp.Texture)
            {
                Rectangle = new Rectangle(0, 0, barwidth, barheight)
            };
            this.XPBar = new Sprite(() => xp.Texture)
            {
                Rectangle = new Rectangle(0, 0, barwidth, barheight)
            };
            this.EmptyBar = new Sprite(() => emp.Texture)
            {
                Rectangle = new Rectangle(0, 0, barwidth, barheight)
            };

            int recallwidth  = (int)(barheight * 1.3f);
            int recallheight = (int)(imagesarray[0].Height * 0.988f); // Same as hero icon Height

            this.Recall = new Sprite(() => recall.Texture)
            {
                Rectangle = new Rectangle(0, 0, recallwidth, recallheight)
            };
            this.Teleport = new Sprite(() => teleport.Texture)
            {
                Rectangle = new Rectangle(0, 0, recallwidth, recallheight)
            };

            this.Spells = new[] { this.R, this.Summoner1, this.Summoner2 };
        }
Beispiel #7
0
 public CustomSprite(Sprite sprite, CachedTexture texture)
 {
     this.Sprite  = sprite;
     this.Texture = texture;
 }