本文整理汇总了C#中Menu.AddCheckBox方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.AddCheckBox方法的具体用法?C# Menu.AddCheckBox怎么用?C# Menu.AddCheckBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.AddCheckBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Config
static Config()
{
try
{
var hero = EntityManager.Heroes.AllHeroes;
var heroName = hero.Select(h => h.BaseSkinName).ToArray();
var summonerList = Program.SpellDB.Where(i => i.SpellType == SpellType.SummonerSpell).ToList();
var itemList = Program.SpellDB.Where(i => i.SpellType == SpellType.Item).ToList();
var wardList = Program.SpellDB.Where(i => i.SpellType == SpellType.Ward).ToList();
var trapList = Program.SpellDB.Where(t => heroName.Contains(t.ChampionName) && t.SpellType == SpellType.Trap).ToList();
var spellList = Program.SpellDB.Where(s => heroName.Contains(s.ChampionName) && s.SpellType == SpellType.Spell).ToList();
#region Main Menu
Menu = MainMenu.AddMenu("TimerBuddy", "TimerBuddy", "TimerBuddy - Life is all about Timing!");
Menu.AddGroupLabel("Welcome to TimerBuddy xD");
Menu.AddLabel(string.Format("{0} datas Loaded", summonerList.Count + itemList.Count + trapList.Count + spellList.Count + wardList.Count));
Menu.AddGroupLabel("General Settings");
Menu.AddImportanceItem("minImportance", "Minimum Importance Level to draw: ");
//Menu.AddGroupLabel("Spell Timer");
Menu.AddCheckBox("sTimer", "Spell Timer", true);
Menu.AddCheckBox("ssTimer", "Summoner Spell Timer", true);
Menu.AddCheckBox("itemTimer", "Item Timer", true);
Menu.AddBlank("mainBlank");
Menu.AddCheckBox("trapTimer", "Trap Timer", true);
Menu.AddCheckBox("wardTimer", "Ward Timer", true);
Menu.AddSeparator();
Menu.AddGroupLabel("Additional Features");
Menu.AddCheckBox("blinkTracker", "Blink Tracker", true);
Menu.AddCheckBox("cloneTracker", "Clone Tracker (WIP)", false);
Menu.AddSeparator();
Menu.AddGroupLabel("Credits");
Menu.AddLabel("Tychus - Addon Developer");
Menu.AddLabel("Hellsing - Dev-a-lot");
Menu.AddLabel("and Developing forum buddies");
#endregion
#region SC2Menu
SC2Menu = Menu.AddSubMenu("Time Tracking List");
SC2Menu.AddGroupLabel("Dragon, Baron Nashor Spawn Time");
SC2Menu.AddCheckBox("jungleEnable", "Enable", true);
SC2Menu.AddBlank("blank");
SC2Menu.AddCheckBox("jungle", "Alarm 10 seconds before", true);
SC2Menu.AddCheckBox("jungle1min", "Alarm 1 minute before", true);
SC2Menu.AddSeparator();
SC2Menu.AddGroupLabel("Spell Cooldown");
SC2Menu.AddCheckBox("ult", "Ultimate (Near heros)", true);
SC2Menu.AddCheckBox("globalUlt", "Global Ultimate", true);
SC2Menu.AddCheckBox("ss", "Summoner Spell (Player Only)", true);
SC2Menu.AddSeparator();
SC2Menu.AddGroupLabel("Global Alarms");
foreach (var database in SC2TimerDatabase.Database.Where(d => heroName.Contains(d.ChampionName) && d.SC2Type == SC2Type.Spell))
SC2Menu.AddCheckBox("sc2global" + database.ChampionName, database.ChampionName + " " + database.Slot.ToString(), database.Global);
SC2Menu.AddSeparator();
SC2Menu.AddGroupLabel("Misc settings");
//SC2Menu.AddSlider("duration", "Notifications duration time", 10, 2, 20);
SC2Menu.AddSlider("maxSlot", "Maximum notifications number", 5, 2, 8);
#endregion
#region SpellMenu
if (spellList.Count > 0)
{
SpellMenu = Menu.AddSubMenu("Spell List");
foreach (var s in spellList)
{
if (MenuChecker.Contains(s.MenuCode))
continue;
MenuChecker.Add(s.MenuCode);
SpellMenu.AddGroupLabel(s.MenuCode);
SpellMenu.AddCheckBox(s.MenuCode + "draw", "Draw", true);
SpellMenu.AddCheckBox(s.MenuCode + "onlyme", "Drawing only Player is " + s.ChampionName, s.OnlyMe);
SpellMenu.AddImportanceItem(s.MenuCode + "importance", "Importance Level: ", s.Importance.ToInt());
SpellMenu.AddDrawTypeItem(s.MenuCode + "drawtype", "Drawing Style: ", s.DrawType.ToInt());
SpellMenu.AddColorItem(s.MenuCode + "color");
SpellMenu.AddSeparator();
}
}
#endregion
#region SummonerMenu
if (summonerList.Count > 0)
{
SummonerMenu = Menu.AddSubMenu("SummonerSpell List");
foreach (var t in summonerList)
{
if (MenuChecker.Contains(t.MenuCode))
continue;
MenuChecker.Add(t.MenuCode);
SummonerMenu.AddGroupLabel(t.MenuCode);
SummonerMenu.Add(t.MenuCode + "draw", new CheckBox("Draw"));
SummonerMenu.AddImportanceItem(t.MenuCode + "importance", "Importance Level: ", t.Importance.ToInt());
SummonerMenu.AddDrawTypeItem(t.MenuCode + "drawtype", "Drawing Style: ", t.DrawType.ToInt());
SummonerMenu.AddColorItem(t.MenuCode + "color");
SummonerMenu.AddSeparator();
//.........这里部分代码省略.........
示例2: Init
public override void Init()
{
try
{
//Creating Spells
_q = new Spell.Skillshot(SpellSlot.Q, 1150, SkillShotType.Linear, 250, 1200, 40);
_w = new Spell.Targeted(SpellSlot.W, 5000);
_e = new Spell.Active(SpellSlot.E, 950);
_r = new Spell.Active(SpellSlot.R, 1500);
try
{
#region Create menu
//Combo Menu Settings
MainMenu.ComboKeys(true, false, true, false);
MainMenu._combo.AddSeparator();
MainMenu._combo.AddGroupLabel("Combo Preferences", "combo.grouplabel.addonmenu", true);
MainMenu._combo.AddCheckBox("combo.gapcloser", "Use minions/jungle for GapCloser", true, true);
MainMenu._combo.AddCheckBox("combo.e.enemy", "Harass enemy with E when minion can die", false, true);
MainMenu._combo.AddSeparator();
MainMenu.ComboManaManager(true, false, false, false, 40, 0, 0, 0);
//Lane Clear Menu Settings
MainMenu.LaneKeys(true, false, true, false);
MainMenu._lane.AddSeparator();
MainMenu._lane.AddGroupLabel("Laneclear Preferences", "lane.grouplabel.addonmenu", true);
MainMenu._lane.AddCheckBox("lane.e.enemy", "Harass enemy with E when minion can die", true, true);
MainMenu._lane.AddSlider("lane.q.min", "Mininum {0} minions to use Q", 3, 2, 10, true);
MainMenu._lane.AddSlider("lane.e.min", "Mininum {0} minions to use E", 3, 2, 10, true);
MainMenu._lane.AddSeparator();//30 q - 30 e
MainMenu._lane.AddGroupLabel("Mana Manager:", "lane.grouplabel.addonmenu.1", true);
MainMenu.LaneManaManager(true, false, true, false, 30, 0, 30, 0);
//Jungle Clear Menu Settings
MainMenu._jungle.AddGroupLabel("JungleClear Settings");
MainMenu._jungle.AddCheckBox("jungle.e", "Kill jungle camps with E");
MainMenu._jungle.AddCheckBox("jungle.e.mini", "Kill mini jungle monsters with E", false);
//Harras Menu Settings
MainMenu.HarassKeys(true, false, false, false);
MainMenu._harass.AddGroupLabel("Harass Preferences", "harass.grouplabel.addonmenu", true);
MainMenu._harass.AddCheckBox("harass.e.enemy", "Harass enemy with E when minion can die", true, true);
MainMenu._harass.AddSeparator();
MainMenu._harass.AddGroupLabel("Mana Manager:", "harass.grouplabel.addonmenu.1", true);
MainMenu.HarassManaManager(true, false, false, false, 60, 0, 0, 0);
//Flee Menu
MainMenu._flee = MainMenu._menu.AddSubMenu("Flee Menu", "flee");
MainMenu._flee.AddGroupLabel("Flee Settings");
MainMenu._flee.AddCheckBox("flee.attack", "Attack champions/minions/monsters");
MainMenu._flee.AddCheckBox("flee.q.jump", "Jump walls with Q on jump spots");
//Killsteal Menu
MainMenu.KsKeys(false, false, true, false);
//Sentinel Manager Menu
_sentinel = MainMenu._menu.AddSubMenu("Sentinel Manager", "sentinel");
_sentinel.AddGroupLabel("Sentinel Settings");
_sentinel.Add("sentinel.castDragon", new KeyBind("Send sentinel to Dragon", false, KeyBind.BindTypes.HoldActive, 'U'));
_sentinel.Add("sentinel.castBaron", new KeyBind("Send sentinel to Baron/Rift Herald", false, KeyBind.BindTypes.HoldActive, 'I'));
_sentinel.AddSeparator();
_sentinel.AddCheckBox("sentinel.enable", "Auto send sentinels", false);
_sentinel.AddCheckBox("sentinel.noMode", "Only when no modes are active");
_sentinel.AddCheckBox("sentinel.alert", "Alert when sentinel is taking damage");
_sentinel.AddSlider("sentinel.mana", "Minimum {0}% mana to auto send W", 40);
_sentinel.AddSeparator();
_sentinel.Add("sentinel.locationLabel", new Label("Send sentinels to:"));
(_sentinel.Add("sentinel.baron", new CheckBox("Baron / Rift Herald"))).OnValueChange += SentinelLocationsChanged;
(_sentinel.Add("sentinel.dragon", new CheckBox("Dragon"))).OnValueChange += SentinelLocationsChanged;
(_sentinel.Add("sentinel.mid", new CheckBox("Mid brush"))).OnValueChange += SentinelLocationsChanged;
(_sentinel.Add("sentinel.blue", new CheckBox("Blue"))).OnValueChange += SentinelLocationsChanged;
(_sentinel.Add("sentinel.red", new CheckBox("Red"))).OnValueChange += SentinelLocationsChanged;
//Misc Menu
MainMenu.MiscMenu();
MainMenu._misc.AddCheckBox("misc.junglestealE", "Junglesteal with E");
MainMenu._misc.AddSeparator();
MainMenu._misc.AddCheckBox("misc.autoE", "Auto use E");
MainMenu._misc.AddSlider("misc.autoEHealth", "Health below {0}% to auto use E", 10, 5, 25);
MainMenu._misc.AddSeparator();
MainMenu._misc.AddCheckBox("misc.unkillableE", "Kill unkillable minions with E");
MainMenu._misc.AddSeparator();
MainMenu._misc.AddCheckBox("misc.useR", "Use R to save ally");
MainMenu._misc.AddSlider("misc.healthR", "{0}% Health to save ally", 15, 5, 25);
//Balista Menu
if (EntityManager.Heroes.Allies.Any(x => x.ChampionName == "Blitzcrank"))
{
_balista = MainMenu._menu.AddSubMenu("Balista", "balista");
{
_balista.AddCheckBox("balista.comboOnly", "Only use Balista in combo mode");
_balista.AddSlider("balista.distance", "Minimum distance between you and Blitzcrank: {0}", 400, 0, 1200);
_balista.AddSeparator();
_balista.Add("balista.label", new Label("Use Balista for:"));
foreach (var enemy in EntityManager.Heroes.Enemies)
{
_balista.AddCheckBox("balista." + enemy.ChampionName, enemy.ChampionName);
//.........这里部分代码省略.........