internal void EnqueLabelForPaint(GroundLabelDecorator decorator, IWorldCoordinate coord, string text) { if (string.IsNullOrEmpty(text)) { return; } if (!_registeredLabels.TryGetValue(coord, out var list)) { list = new List <RegisteredLabel>(); _registeredLabels.Add(coord, list); } list.Add(new RegisteredLabel() { Decorator = decorator, Coord = coord, Text = text }); }
public override void Load(IController hud) { base.Load(hud); Priorities = new Dictionary <MonsterAffix, int>() { { MonsterAffix.Juggernaut, 20 }, { MonsterAffix.Arcane, 10 }, { MonsterAffix.Desecrator, 10 }, { MonsterAffix.Frozen, 10 }, { MonsterAffix.Molten, 9 }, { MonsterAffix.FrozenPulse, 8 }, { MonsterAffix.Thunderstorm, 8 }, { MonsterAffix.Reflect, 7 }, { MonsterAffix.Electrified, 5 }, { MonsterAffix.Jailer, 5 }, { MonsterAffix.Mortar, 5 }, { MonsterAffix.Orbiter, 5 }, { MonsterAffix.Plagued, 6 }, { MonsterAffix.Poison, 5 }, { MonsterAffix.Waller, 3 }, { MonsterAffix.FireChains, 1 }, { MonsterAffix.Shielding, 1 }, { MonsterAffix.Avenger, 0 }, { MonsterAffix.ExtraHealth, 0 }, { MonsterAffix.Fast, 0 }, { MonsterAffix.HealthLink, 0 }, { MonsterAffix.Horde, 0 }, { MonsterAffix.Illusionist, 0 }, { MonsterAffix.Knockback, 0 }, { MonsterAffix.MissileDampening, 0 }, { MonsterAffix.Nightmarish, 0 }, { MonsterAffix.Teleporter, 0 }, { MonsterAffix.Vampiric, 0 }, { MonsterAffix.Vortex, 0 }, { MonsterAffix.Wormhole, 0 } }; ChampionPackLineBrush = Hud.Render.CreateBrush(255, 125, 175, 240, -1.5f); ChampionPackNameFont = Hud.Render.CreateFont("tahoma", 9.0f, 255, 125, 175, 240, true, false, 255, 0, 0, 0, true); RarePackLineBrush = Hud.Render.CreateBrush(255, 240, 175, 125, -1.5f); RarePackNameFont = Hud.Render.CreateFont("tahoma", 9.0f, 255, 240, 175, 125, true, false, 255, 0, 0, 0, true); MiddleHealthBarWidth = 0.05f; MiddleHealthBarHeight = 0.007f; HealthBorder = Hud.Render.CreateBrush(255, 0, 0, 0, 1); HealthBackgroundMax = Hud.Render.CreateBrush(255, 200, 0, 0, 0); HealthBackgroundChampionRemaining = Hud.Render.CreateBrush(255, 125, 175, 240, 0); HealthBackgroundRareRemaining = Hud.Render.CreateBrush(255, 240, 175, 125, 0); HealthBackgroundRareMinionRemaining = Hud.Render.CreateBrush(255, 180, 180, 180, 0); WeakDecorator = new GroundLabelDecorator(Hud) { BackgroundBrush = Hud.Render.CreateBrush(255, 50, 50, 50, 0), BorderBrush = Hud.Render.CreateBrush(128, 0, 0, 0, 2), TextFont = Hud.Render.CreateFont("tahoma", 5f, 200, 220, 120, 0, false, false, false), ForceOnScreen = false, CenterBaseLine = false, }; CustomAffixNames = new Dictionary <MonsterAffix, string>(); var importantBorderBrush = Hud.Render.CreateBrush(128, 0, 0, 0, 2); var importantLabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 255, 255, true, false, false); AffixDecorators = new Dictionary <MonsterAffix, GroundLabelDecorator>(); AffixDecorators.Add(MonsterAffix.Arcane, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 120, 0, 120, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Desecrator, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 170, 50, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Electrified, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 40, 40, 240, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Frozen, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 0, 0, 120, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.FrozenPulse, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 0, 0, 120, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Jailer, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 120, 0, 120, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Juggernaut, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 200, 0, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Molten, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 170, 50, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Mortar, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 170, 50, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Orbiter, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 40, 40, 240, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Plagued, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 0, 120, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Poison, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 0, 120, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Reflect, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 120, 50, 0, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Thunderstorm, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 40, 40, 240, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.Waller, new GroundLabelDecorator(Hud) { BorderBrush = importantBorderBrush, TextFont = importantLabelFont, BackgroundBrush = Hud.Render.CreateBrush(255, 50, 50, 50, 0), ForceOnScreen = false, CenterBaseLine = false, }); AffixDecorators.Add(MonsterAffix.ExtraHealth, WeakDecorator); AffixDecorators.Add(MonsterAffix.HealthLink, WeakDecorator); AffixDecorators.Add(MonsterAffix.Fast, WeakDecorator); AffixDecorators.Add(MonsterAffix.FireChains, WeakDecorator); AffixDecorators.Add(MonsterAffix.Knockback, WeakDecorator); AffixDecorators.Add(MonsterAffix.Nightmarish, WeakDecorator); AffixDecorators.Add(MonsterAffix.Illusionist, WeakDecorator); AffixDecorators.Add(MonsterAffix.Shielding, WeakDecorator); AffixDecorators.Add(MonsterAffix.Teleporter, WeakDecorator); AffixDecorators.Add(MonsterAffix.Vampiric, WeakDecorator); AffixDecorators.Add(MonsterAffix.Vortex, WeakDecorator); AffixDecorators.Add(MonsterAffix.Wormhole, WeakDecorator); AffixDecorators.Add(MonsterAffix.Avenger, WeakDecorator); AffixDecorators.Add(MonsterAffix.Horde, WeakDecorator); AffixDecorators.Add(MonsterAffix.MissileDampening, WeakDecorator); }