Exemple #1
0
        /// <summary>
        /// load horizontal hero texure
        /// </summary>
        /// <param name="id"></param>
        public static void LoadHeroTexture(HeroId id)
        {
            if (LoadedList.Contains(id.ToString()))
            {
                return;
            }
            LoadedList.Add(id.ToString());
            var itemString = id.ToString().Remove(0, 14);

            Log.Debug($"Load from dota hero[horizontal] texture: {id} TextureKey: [{itemString}]");
            Render.LoadFromFile(id.ToString(),
                                $@"{GamePath}\game\dota\materials\ensage_ui\miniheroes\png\{itemString}.png");
        }
Exemple #2
0
        /// <summary>
        /// load horizontal hero texure
        /// </summary>
        /// <param name="id"></param>
        public static void LoadHeroTexture(HeroId id)
        {
            if (LoadedList.Contains(id.ToString()))
            {
                return;
            }
            LoadedList.Add(id.ToString());
            var itemString = id.ToString().Remove(0, 14);

            Console.WriteLine($"Load from dota hero[horizontal] texture: {id} TextureKey: [{itemString}]");
            Render.LoadFromDota($"{id}", $@"panorama\images\heroes\icons\{id}_png.vtex_c");

            /*Render.LoadFromFile(id.ToString(),
             *  $@"{GamePath}\game\dota\materials\ensage_ui\miniheroes\png\{itemString}.png");*/
        }
        // Token: 0x060000DE RID: 222 RVA: 0x00011340 File Offset: 0x0000F540
        public void LoadFromDota(HeroId heroId, bool rounded = false, bool icon = false)
        {
            string text = heroId.ToString();

            if (icon)
            {
                string file = string.Format("panorama\\images\\heroes\\icons\\{0}_png.vtex_c", text);
                this.LoadFromDota(text + "_icon", file, 0, 0, false, 0, null);
                return;
            }
            this.LoadFromDota(text, rounded);
        }
Exemple #4
0
        public void AddHero(HeroId id, bool?value = null, int priority = 0)
        {
            if (this.Renderer == null)
            {
                this.loadTextures.Add(id);
            }
            else
            {
                RendererManager.LoadTexture(id);
            }

            this.AddHero(id.ToString(), value, priority);
        }
 // Token: 0x060003A3 RID: 931 RVA: 0x0001CB5C File Offset: 0x0001AD5C
 public void Activate()
 {
     this.textureManager = this.context.Renderer.TextureManager;
     foreach (Player player in ObjectManager.GetEntities <Player>())
     {
         HeroId selectedHeroId = player.SelectedHeroId;
         if (selectedHeroId != HeroId.npc_dota_hero_base)
         {
             this.textureManager.LoadFromDota(selectedHeroId, false, false);
             this.textureManager.LoadFromDota(selectedHeroId, true, false);
             this.textureManager.LoadFromDota(selectedHeroId, false, true);
             this.loaded.Add(selectedHeroId.ToString());
         }
     }
     EntityManager9.UnitAdded    += this.OnUnitAdded;
     EntityManager9.AbilityAdded += this.OnAbilityAdded;
     this.LoadTextures();
 }
Exemple #6
0
        private void AddHero(HeroId id)
        {
            var name = id.ToString();

            if (this.heroes.ContainsKey(name))
            {
                return;
            }

            if (this.Renderer == null)
            {
                this.loadTextures.Add(id);
            }
            else
            {
                this.Renderer.TextureManager.LoadHeroFromDota(id);
            }

            if (this.savedHeroes.TryGetValue(name, out var savedValue))
            {
                this.heroes[name] = savedValue;
            }
            else
            {
                this.heroes[name] = this.defaultValue;
            }

            if (this.SizeCalculated)
            {
                this.CalculateSize();
                this.ParentMenu.CalculateWidth();
            }

            if (this.heroes.Count >= 5)
            {
                EntityManager9.UnitAdded -= this.OnUnitAdded;
            }
        }
Exemple #7
0
        // Token: 0x0600022B RID: 555 RVA: 0x00017C70 File Offset: 0x00015E70
        private void AddHero(HeroId id)
        {
            string key = id.ToString();

            if (this.heroes.ContainsKey(key))
            {
                return;
            }
            if (base.Renderer == null)
            {
                this.loadTextures.Add(id);
            }
            else
            {
                base.Renderer.TextureManager.LoadFromDota(id, false, false);
            }
            bool value;

            if (this.savedHeroes.TryGetValue(key, out value))
            {
                this.heroes[key] = value;
            }
            else
            {
                this.heroes[key] = this.defaultValue;
            }
            if (base.SizeCalculated)
            {
                float num = base.DisplayNameSize.X + base.MenuStyle.LeftIndent + base.MenuStyle.RightIndent + 10f + base.MenuStyle.TextureArrowSize * 2f + (float)this.heroes.Count * base.MenuStyle.TextureHeroSize.X;
                base.Size = new Vector2(num, base.MenuStyle.Height);
                base.ParentMenu.CalculateWidth(false);
            }
            if (this.heroes.Count >= 5)
            {
                EntityManager9.UnitAdded -= this.OnUnitAdded;
            }
        }
Exemple #8
0
 public Config(HeroId id)
 {
     this.Factory = MenuFactory.Create("BAIO");
     this.General = new GeneralMenu(this.Factory);
     this.Hero    = new HeroMenu(this.Factory, id.ToString());
 }
 public SpellAttribute(AbilityId abilityId, HeroId heroId)
 {
     AbilityId = abilityId;
     HeroId    = heroId;
     UnitName  = heroId.ToString();
 }
Exemple #10
0
 public VaperMenu(HeroId id)
 {
     this.Factory = MenuFactory.Create("Vaper");
     this.General = new GeneralMenu(this.Factory);
     this.Hero    = new HeroMenu(this.Factory, id.ToString());
 }
Exemple #11
0
 public static string LocalizeName(HeroId id)
 {
     return(LocalizeName(id.ToString()));
 }
Exemple #12
0
 public Menu SetTexture(HeroId id)
 {
     return(this.SetTexture(id.ToString()));
 }
Exemple #13
0
 public void LoadHeroFromDota(HeroId heroId, bool rounded = false, bool icon = false)
 {
     this.LoadHeroFromDota(heroId.ToString(), rounded, icon);
 }