本文整理汇总了C#中Menu.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.Add方法的具体用法?C# Menu.Add怎么用?C# Menu.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public static void Init()
{
Drawing.OnDraw += Drawing_OnDraw;
WardjumpMenu = Program.menu.AddSubMenu("WardJump Settings", "wardJumpSettings");
WardjumpMenu.AddGroupLabel("Wardjump Settings");
var a = WardjumpMenu.Add("alwaysMax", new CheckBox("Always Jump To Max Range"));
var b = WardjumpMenu.Add("onlyToCursor", new CheckBox("Always Jump To Cursor", false));
a.OnValueChange += delegate { if (a.CurrentValue) b.CurrentValue = false; };
b.OnValueChange += delegate { if (b.CurrentValue) a.CurrentValue = false; };
WardjumpMenu.AddSeparator();
WardjumpMenu.AddLabel("Time Modifications");
WardjumpMenu.Add("checkTime", new Slider("Position Reset Time (ms)", 100, 1, 2000));
WardjumpMenu.AddSeparator();
WardjumpMenu.AddLabel("Keybind Settings");
var wj = WardjumpMenu.Add("wardjumpKeybind",
new KeyBind("WardJump", false, KeyBind.BindTypes.HoldActive, 'Z'));
WardjumpMenu.Add("drawWJ", new CheckBox("Draw WardJump"));
GameObject.OnCreate += GameObject_OnCreate;
Game.OnTick += delegate
{
if (wj.CurrentValue)
{
WardjumpActive = true;
WardJump(Game.CursorPos, a.CurrentValue, b.CurrentValue);
return;
}
WardjumpActive = false;
};
}
示例2: LoadingOnOnLoadingComplete
private static void LoadingOnOnLoadingComplete(EventArgs args)
{
//Menu
BaseUltMenu = MainMenu.AddMenu("BaseUlt+", "baseUltMenu");
BaseUltMenu.AddGroupLabel("BaseUlt+ General");
BaseUltMenu.AddSeparator();
BaseUltMenu.Add("baseult", new CheckBox("BaseUlt"));
BaseUltMenu.Add("showrecalls", new CheckBox("Show Recalls"));
BaseUltMenu.Add("showallies", new CheckBox("Show Allies"));
BaseUltMenu.Add("showenemies", new CheckBox("Show Enemies"));
BaseUltMenu.Add("checkcollision", new CheckBox("Check Collision"));
BaseUltMenu.AddSeparator();
BaseUltMenu.Add("timeLimit", new Slider("FOW Time Limit (SEC)", 20, 0, 120));
BaseUltMenu.AddSeparator();
BaseUltMenu.Add("nobaseult", new KeyBind("No BaseUlt while", false, KeyBind.BindTypes.HoldActive, 32));
BaseUltMenu.AddSeparator();
BaseUltMenu.Add("x", new Slider("Offset X", 0, -500, 500));
BaseUltMenu.Add("y", new Slider("Offset Y", 0, -500, 500));
BaseUltMenu.AddGroupLabel("BaseUlt+ Targets");
foreach (var unit in HeroManager.Enemies)
{
BaseUltMenu.Add("target" + unit.ChampionName, new CheckBox(string.Format("{0} ({1})", unit.ChampionName, unit.Name)));
}
BaseUltMenu.AddGroupLabel("BaseUlt+ Credits");
BaseUltMenu.AddLabel("By: LunarBlue");
BaseUltMenu.AddLabel("Testing: FinnDev");
// Initialize the Addon
OfficialAddon.Initialize();
// Listen to the two main events for the Addon
Game.OnUpdate += args1 => OfficialAddon.OnUpdate();
Drawing.OnEndScene += args1 => OfficialAddon.OnEndScene();
Teleport.OnTeleport += OfficialAddon.OnTeleport;
}
示例3: LoadMenu
public static void LoadMenu() //Menu
{
Bootstrap.Init(null);
Menu = MainMenu.AddMenu("BaseUlt", "Baseult");
Menu.AddGroupLabel("BaseUlt");
Menu.AddLabel("Test");
Menu.AddSeparator();
Menu.Add("baseult", new CheckBox("Enable BaseUlt?"));
Menu.Add("showrecall", new CheckBox("Show Recalls?"));
Menu.Add("showallies", new CheckBox("Show Allies?"));
Menu.Add("showenemies", new CheckBox("Show Enemies?"));
Menu.Add("checkcollision", new CheckBox("Check Collision?"));
Menu.AddSeparator();
Menu.Add("timelimit", new Slider("Select FOW Time Limit (SEC)", 20, 0, 120));
Menu.AddSeparator();
Menu.Add("nobaseult", new KeyBind("No BaseUlt while", false, KeyBind.BindTypes.HoldActive, 32));
Menu.AddSeparator();
Menu.Add("x", new Slider("Offset X", 0, -500, 500));
Menu.Add("y", new Slider("Offset Y", 0, -500, 500));
Menu.AddGroupLabel("BaseUlt Targets");
foreach (var unit in EntityManager.Heroes.Enemies)
{
Menu.Add("target" + unit.ChampionName, new CheckBox(string.Format("{0} ({1})", unit.ChampionName, unit.Name)));
}
Core.Initialize(); //Referenz to Core-Start
Game.OnUpdate += args1 => Core.OnUpdate(); //Updating Core
Drawing.OnEndScene += args1 => Core.OnEndScene(); //Updating Core at End of Game
//Teleport.OnTeleport += Core.OnTeleport; //Updating Core at Teleport BUGGY
}
示例4: Combo
static Combo()
{
Menu = Config.Menu.AddSubMenu("连招");
_useQ = Menu.Add("useQCombo", new CheckBox("使用 Q"));
_useW = Menu.Add("useWCombo", new CheckBox("使用 W"));
_useR = Menu.Add("useRCombo", new CheckBox("使用 R"));
}
示例5: Enter
public override void Enter()
{
menu = new Menu();
menu.Add(new MenuItem() { Text = "返回", Command = OnReturn, });
menu.Add(new MenuItem() { Text = "输入密码", Command = OnEnterPass, });
}
示例6: Loading_OnLoadingComplete
private static void Loading_OnLoadingComplete(EventArgs args)
{
menu = MainMenu.AddMenu("Shroom Tracker", "ShroomTracker");
menu.Add("ABOUT", new Label("This Addon was designed by Chaos"));
menu.Add("Draw", new CheckBox("Draw Shrooms", true));
menu.Add("Text", new CheckBox("Draw Text on Shroom", true));
menu.Add("Width", new Slider("Shroom Circle Width", 20, 1, 59));
List<string> colorList = new List<string>();
foreach (PropertyInfo info in typeof(Color).GetProperties())
if (!badNames.Contains(info.Name))
colorList.Add(info.Name);
Slider slider = menu.Add("Color", new Slider("Shroom Color", 52, 0, colorList.Count - 1));
//check for existing shrooms
foreach (GameObject obj in ObjectManager.Get<GameObject>())
if (obj.Name == "Noxious Trap" && obj.IsEnemy && !obj.IsDead)
Shrooms.Add(obj);
Drawing.OnDraw += Drawing_OnDraw;
GameObject.OnCreate += GameObject_OnCreate;
GameObject.OnDelete += GameObject_OnDelete;
slider.OnValueChange += Slider_OnValueChange;
Slider_OnValueChange(slider, null);
}
示例7: Farm
static Farm()
{
Menu = DrawingMenu.Menu.AddSubMenu("Farming");
_withQ = Menu.Add("useQ", new CheckBox("Q"));
_withW = Menu.Add("useW", new CheckBox("W"));
_withE = Menu.Add("useE", new CheckBox("E"));
}
示例8: Harass
static Harass()
{
Menu = Config.Menu.AddSubMenu("Harass");
_useQ = Menu.Add("useQHarass", new CheckBox("Use Q"));
_useE = Menu.Add("useEHarass", new CheckBox("Use E"));
_minMana = Menu.Add("minManaHarass", new Slider("Mana %> to Harass", 40));
}
示例9: Harass
static Harass()
{
Menu = Config.Menu.AddSubMenu("Harass");
_useQ = Menu.Add("useQHarass", new CheckBox("Use Q"));
_useW = Menu.Add("useWHarass", new CheckBox("Use W"));
_minMana = Menu.Add("minManaHarass", new Slider("Mana % for Harras", 40));
}
示例10: Drawings
static Drawings()
{
Menu = Config.Menu.AddSubMenu("Drawings");
Menu.AddGroupLabel("Drawings");
Menu.Add("damageKillable", new CheckBox("Show text if champion is killable"));
Menu.Add("damageChampionTarget", new CheckBox("Show circle below targeted champion"));
}
示例11: Enter
public override void Enter()
{
menu = new Menu();
menu.Add(new MenuItem() { Text = "退出", Command = OnExit, });
menu.Add(new MenuItem() { Text = "注册", Command = OnSignUp, });
menu.Add(new MenuItem() { Text = "登陆", Command = OnSignIn, });
}
示例12: InitializeMenuConfig
static void InitializeMenuConfig(Menu subMenu)
{
if (Initialized)
{
return;
}
ShielderMenu = subMenu;
subMenu.AddGroupLabel("Auto Shielder");
subMenu.AddLabel("This submenu is responsible for auto-shielding.");
subMenu.AddLabel("It takes into account player mana based on Mana Manager settings.");
subMenu.AddGroupLabel("Basic Autoattacks");
subMenu.Add("ShielderOnEnemyAA", new CheckBox("Shield against enemy AA"));
subMenu.Add("ShielderOnEnemyTurretAA", new CheckBox("Shield against turret attacks"));
subMenu.Add("ShielderOnAllyAA", new CheckBox("Boost ally AA damage"));
subMenu.Add("ShielderOnAllyTurretAA", new CheckBox("Boost turret AA damage against heroes"));
subMenu.AddGroupLabel("Spell Casts");
subMenu.Add("ShielderOnEnemySpell", new CheckBox("Shield against enemy spells"));
subMenu.Add("ShielderOnAllySpell", new CheckBox("Boost ally spell damage"));
subMenu.AddGroupLabel("Delay");
subMenu.Add("ShielderDelay", new Slider("Delay shielding by {0} ms", 50, 0, 500));
subMenu.Add("ShielderDelayRandom", new Slider("Randomize delay by adding up to {0} ms", 50, 0, 500));
subMenu.AddGroupLabel("Ally Whitelist");
subMenu.AddLabel("Choose which allies to shield.");
foreach (var ally in EntityManager.Heroes.Allies)
{
subMenu.Add("ShielderAllyWhitelist" + ally.ChampionName, new CheckBox(ally.ChampionName));
}
subMenu.AddGroupLabel("Ally Spell Whitelist");
subMenu.AddLabel("Choose which allied spells to boost with shield.");
foreach (var ally in EntityManager.Heroes.Allies)
{
var allySpells =
SpellDatabase.DamageBoostSpells.Where(
s => s.Champion.Equals(ally.ChampionName, StringComparison.CurrentCultureIgnoreCase));
if (allySpells.ToList().Count > 0)
{
subMenu.AddLabel(ally.ChampionName);
foreach (var spell in allySpells)
{
subMenu.Add("ShielderAllySpellWhitelist" + spell.SpellName, new CheckBox(spell.SpellName));
}
}
}
subMenu.AddGroupLabel("Enemy Spell Whitelist");
subMenu.AddLabel("Choose which enemy spells to shield against.");
foreach (var enemy in EntityManager.Heroes.Enemies)
{
var enemySpells =
SpellDatabase.TargetedSpells.Where(
s => s.Champion.Equals(enemy.ChampionName, StringComparison.CurrentCultureIgnoreCase));
if (enemySpells.ToList().Count > 0)
{
subMenu.AddLabel(enemy.ChampionName);
foreach (var spell in enemySpells)
{
subMenu.Add("ShielderEnemySpellWhitelist" + spell.SpellName, new CheckBox(spell.SpellName));
}
}
}
}
示例13: Load_OnLoad
static void Load_OnLoad(object sender, EventArgs e)
{
Bootstrap.Init(null);
Config = new Menu("Useless Annie", "Useless Annie", true);
var combo = Config.Add(new Menu("Combo", "Combo"));
combo.Add(new MenuBool("useQ", "Use Q", true));
combo.Add(new MenuBool("UseW", "Use W", true));
combo.Add(new MenuBool("useE", "Use E", true));
combo.Add(new MenuBool("useR", "Use R", true));
var harass = Config.Add(new Menu("harass", "Harass"));
harass.Add(new MenuBool("useQ", "Use Q", true));
harass.Add(new MenuBool("useW", "Use W", true));
var farm = Config.Add(new Menu("farm", "Farming"));
farm.Add(new MenuSeparator("ss", "Last Hit Settings"));
farm.Add(new MenuBool("useQLH", "Use Q", true));
farm.Add(new MenuSeparator("ss2", "WaveClear Settings"));
farm.Add(new MenuBool("useQWC", "Use Q", true));
farm.Add(new MenuBool("useWWC", "Use W", true));
farm.Add(new MenuSeparator("ss3", "Jungle Settings"));
farm.Add(new MenuBool("useQJC", "Use Q", true));
farm.Add(new MenuBool("useWJC", "Use W", true));
Config.Attach();
Q = new Spell(SpellSlot.Q, 625);
W = new Spell(SpellSlot.W, 625);
E = new Spell(SpellSlot.E);
R = new Spell(SpellSlot.R, 600);
Game.OnUpdate += Game_OnUpdate;
}
示例14: Init
public static void Init()
{
slot1 = _Player.Spellbook.GetSpell(SpellSlot.Summoner1);
slot2 = _Player.Spellbook.GetSpell(SpellSlot.Summoner2);
var smiteNames = new[]
{
"s5_summonersmiteplayerganker", "itemsmiteaoe", "s5_summonersmitequick",
"s5_summonersmiteduel", "summonersmite"
};
if (smiteNames.Contains("smite"))
{
smite = new Spell.Targeted(SpellSlot.Summoner1, (uint) 560f);
smiteSlot = SpellSlot.Summoner1;
}
if (smiteNames.Contains("smite"))
{
smite = new Spell.Targeted(SpellSlot.Summoner2, (uint) 560f);
smiteSlot = SpellSlot.Summoner2;
}
Smiterino = Program.Menu.AddSubMenu("Auto Smite", "Smite");
Smiterino.AddGroupLabel("Auto Smite Settings");
Smiterino.AddSeparator();
Smiterino.Add("smiteActive", new CheckBox("Smite Active"));
Smiterino.Add("drawHp", new CheckBox("Draw HP Bar on Minions"));
Smiterino.Add("autoSmite", new KeyBind("AutoSmite Active HotKey", true, KeyBind.BindTypes.PressToggle, 'N'));
Game.OnUpdate += OnUpdate;
Drawing.OnDraw += OnDraw;
}
示例15: Misc
static Misc()
{
// Initialize the menu values
Menu = Config.Menu.AddSubMenu("Misc");
_drawQ = Menu.Add("drawQ", new CheckBox("Draw Q"));
_drawW = Menu.Add("drawW", new CheckBox("Draw W"));
_drawE = Menu.Add("drawE", new CheckBox("Draw E"));
_drawReadySpellsOnly = Menu.Add("drawReady", new CheckBox("Draw ready spells only"));
Menu.AddSeparator();
_ksW = Menu.Add("ksQ", new CheckBox("KS with W"));
_ksR = Menu.Add("ksR", new CheckBox("KS with R"));
Menu.AddSeparator();
_useHeal = Menu.Add("useHeal", new CheckBox("Use Heal Smart"));
_useQSS = Menu.Add("useQSS", new CheckBox("Use QSS"));
Menu.AddSeparator();
for (int i = 0; i < EntityManager.Heroes.Allies.Count; i++)
{
_useHealOn[i] = Menu.Add("useHeal" + i, new CheckBox("Use Heal to save " + EntityManager.Heroes.Allies[i].ChampionName));
}
Menu.AddSeparator();
_useEOnGapcloser = Menu.Add("useEOnGapcloser", new CheckBox("Use E on Gapcloser", false));
_EOnImmobileEnemy = Menu.Add("EOnImmobile", new CheckBox("Use E on immobile enemy"));
_EOnSlowedEnemy = Menu.Add("EOnSlowed", new CheckBox("Use E on slowed enemy", false));
_useEInterrupt = Menu.Add("EToInterrupt", new CheckBox("Use E as interrupt"));
_interruptDangerLvl = Menu.Add("InterruptDangerLvl", new Slider("Interrupt Danger Lvl", 2, 1, 3));
Menu.AddSeparator();
_stealDrake = Menu.Add("stealDrake", new CheckBox("Try to steal Dragon"));
_stealBaron = Menu.Add("stealBaron", new CheckBox("Try to steal Baron"));
Menu.AddSeparator();
_autolevelskills = Menu.Add("autolevelskills", new CheckBox("Autolevelskills"));
_autoBuyStartingItems = Menu.Add("autoBuyStartingItems", new CheckBox("Autobuy Starting Items (SR only)"));
Menu.AddSeparator();
_useSkinHack = Menu.Add("useSkinHack", new CheckBox("Use Skinhack", false));
_skinId = Menu.Add("skinId", new Slider("Skin ID", 6, 1, 14));
}