protected override void OnActivate() { base.OnActivate(); var factory = this.Config.Hero.Factory; var itemMenu = this.Config.Hero.ItemMenu; this.OverloadKeyMenu = factory.Menu("Overload Menu", "overloadmenu"); this.OverloadKey = OverloadKeyMenu.Item("Overload Charge Key", new KeyBind(71)); this.OverloadKey.Item.Tooltip = "Will use ulti on position to get a overload charge"; this.CheckModifier = OverloadKeyMenu.Item("Check Overload modifier", true); this.CheckModifier.Item.Tooltip = "Will check if you have overload modifier and won't use ulti if you do"; this.OverloadKeyDelay = OverloadKeyMenu.Item("Overload key delay/cooldown", new Slider(100, 1, 500)); this.DistanceForUlt = factory.Item("Max Distance for Ult", new Slider(1000, 0, 10000)); this.DistanceForUlt.Item.Tooltip = "Enemies outside of this range will not be chased."; this.EscapeKey = factory.Item("Escape Key", new KeyBind(70)); this.EscapeKey.Item.Tooltip = "Will use ulti + tp/travel to run away in dangerous situations."; this.IgnoreOverload = factory.Item("Ignore Overload for vortex", false); this.DrawingPrefMenu = factory.Item("Drawing Type", new StringList(new[] { "PercentLeft", "PercentWillBeUsed", "RawCost", "RawLeft" }, 1)); this.DrawType = this.DrawingPrefMenu.GetEnum <DrawsTypes>(); this.DrawingX = factory.Item("Drawing X", new Slider(0, 0, 1800)); this.DrawingY = factory.Item("Drawing Y", new Slider(0, 0, 1800)); this.BtAndOrchidHeroes = itemMenu.Item("Orchid/Bloodthorn", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.SheepHeroes = itemMenu.Item("Hex", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.NullifierHeroes = itemMenu.Item("Nullifier", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.EscapeHandler = UpdateManager.Run(this.OnUpdate); this.Remnant = this.Context.AbilityFactory.GetAbility <storm_spirit_static_remnant>(); this.Vortex = this.Context.AbilityFactory.GetAbility <storm_spirit_electric_vortex>(); this.Overload = this.Context.AbilityFactory.GetAbility <storm_spirit_overload>(); this.Ulti = this.Context.AbilityFactory.GetAbility <storm_spirit_ball_lightning>(); this.DrawingPrefMenu.PropertyChanged += this.DrawingPrefMenuPropertyChanged; Unit.OnModifierAdded += this.OnOverloadAdded; Unit.OnModifierRemoved += this.OnOverloadRemoved; Unit.OnModifierAdded += this.OnUltiAdded; Unit.OnModifierRemoved += this.OnUltiRemoved; this.Context.RenderManager.Draw += this.OnDraw; }
private void DrawingPrefMenuPropertyChanged(object sender, PropertyChangedEventArgs e) { this.DrawType = this.DrawingPrefMenu.GetEnum <DrawsTypes>(); }