private void BuildMenu() { BaseUltMenu.AddGroupLabel("Recall tracker settings"); BaseUltMenu.Add("RecallTracker.Enable", new CheckBox("Enable Recall tracker")); BaseUltMenu.Add("RecallTracker.BarColor", new CheckBox("Change bar color", false)).OnValueChange += (a, b) => { if (!b.NewValue) { return; } ColorPicker.Initialize(Color.DeepPink); a.CurrentValue = false; }; var fontSize = BaseUltMenu.Add("RecallTracker.FontSize", new Slider("Font size : {0}", 10, 5, 20)); fontSize.OnValueChange += (sender, args) => { Text.ReplaceFont(new Font("tahoma", args.NewValue, FontStyle.Italic)); TextHeight = Text.Description.Height; }; Text.ReplaceFont(new Font("tahoma", fontSize.CurrentValue, FontStyle.Italic)); TextHeight = Text.Description.Height; BaseUltMenu.Add("RecallTracker.BarSize", new Slider("Bar thickness : {0}", 7, 1, 15)); if (!SupportedChampions.Contains(Player.Instance.Hero)) { BaseUltMenu.AddGroupLabel("Your champion is not supported !"); Dispose(); return; } BaseUltMenu.AddGroupLabel("Base ult settings"); BaseUltMenu.AddLabel("Basic settings : "); BaseUltMenu.Add("BaseUlt.Enable", new CheckBox("Enable Base ult")); BaseUltMenu.Add("BaseUlt.DisableInComboMode", new CheckBox("Disable Base ult in combo mode", false)); BaseUltMenu.Add("BaseUlt.MaxTimeout", new Slider("Maximum target invisibility time : {0} seconds", 30, 0, 120)); BaseUltMenu.AddSeparator(2); BaseUltMenu.AddLabel("Health prediction is not working currently.\nPlease don't set this value too high or you will see a lot missed baseults."); BaseUltMenu.AddSeparator(5); BaseUltMenu.AddLabel("Whitelist :"); foreach (var aiHeroClient in StaticCacheProvider.GetChampions(CachedEntityType.EnemyHero)) { BaseUltMenu.Add($"BaseUlt.Enable.{aiHeroClient.ChampionName}", new CheckBox($"Enable on {aiHeroClient.ChampionName}")); } SubscribeToEvents(); }
private static Champion Initialize() { if (!SupportedChampions.Any()) { return(null); } var type = SupportedChampions.FirstOrDefault(x => x.Name.Equals(ObjectManager.Player.CharacterName, StringComparison.OrdinalIgnoreCase)); if (type == null) { return(null); } return((Champion)DynamicInitializer.NewInstance(type)); }