static void DisabledCommands() { var m = new CMenu(); /* * In this example, a global flag is used to determine the visibility of disabled commands. * It is initially cleared, the 'enable' command sets it. */ Enabled = false; m.Add("enable", s => Enabled = true); /* * Create a new inline command, then set its enabledness function so it returns the above flag. */ var mi = m.Add("inline", s => Console.WriteLine("Disabled inline command was enabled!")); mi.SetEnablednessCondition(() => Enabled); /* * Command abbreviations do not change when hidden items become visible, i.e. it is made sure they are already long * enough. This avoids confusion about abbreviations suddenly changing. */ m.Add("incollision", s => Console.WriteLine("The abbreviation of 'incollision' is longer to account for the hidden 'inline' command.")); /* * It is also possible to override the visibility by subclassing. */ m.Add(new DisabledItem()); m.Run(); }
static void PromptlessMode() { var m = new CMenu(); m.Add("promptless", s => { m.CQ.PromptUserForInput = false; Console.WriteLine("Promptless mode selected. Input will be ignored."); Console.WriteLine("A timer will be set which will input 'active' in 5 seconds."); new Thread(() => { for (int i = 5; i >= 0; i--) { Console.WriteLine(i + "..."); Thread.Sleep(1000); } Console.WriteLine("Sending input 'active' to the command queue."); m.CQ.ImmediateInput("active"); }).Start(); }); m.Add("active", s => { m.CQ.PromptUserForInput = true; Console.WriteLine("Prompting mode selected again."); }); Console.WriteLine("IO is currently in active mode - you will be prompted for input."); Console.WriteLine("The 'promptless' command will turn on promptless mode, which disables interactive input."); Console.WriteLine("The 'active' command will turn active mode back on."); Console.WriteLine("Please enter 'promptless' (or 'p')."); m.Run(); }
static void ImmediateMode() { var m = new CMenu(); m.ImmediateMenuMode = true; m.Add("foo", s => Console.WriteLine("foo")); m.Add("bar", s => Console.WriteLine("bar")); m.Run(); }
public void Run() { var menu = new CMenu(); menu.Add("view", (name) => RenderSystem(name)); menu.Run(); Console.WriteLine(">>>> DONE"); }
static ComboMenu() { CMenu.AddGroupLabel("Combo Options"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Use [Q]")); _useW = CMenu.Add("comboUseW", new CheckBox("Use [W]")); _useE = CMenu.Add("comboUseE", new CheckBox("Use [E]")); CMenu.AddSeparator(); _useR = CMenu.Add("comboUseR", new CheckBox("Use [R]")); _rMinHP = CMenu.Add("comboMinHP", new Slider("Minimum HP for cast({0})", 15)); }
private void Basics() { // Create menu menu = new CMenu(); // Let's specify a custom prompt so we later clearly know we're in the tutorial menu. menu.PromptCharacter = "tutorial>"; // Add simple Hello World command menu.Add("hello", s => Console.WriteLine("Hello world!")); /* * If the command happens to be more complex, you can just put it in a separate method. */ menu.Add("len", s => PrintLen(s)); /* * It is also possible to return an exit code to signal that processing should be stopped. * By default, the command "quit" exists for this purpose. Let's add an alternative way to stop processing input. */ menu.Add("exit", s => menu.Quit()); /* * To create a command with help text, simply add it during definition. */ menu.Add("time", s => Console.WriteLine(DateTime.UtcNow), "Help for \"time\": Writes the current time"); /* * You can also access individual commands to edit them later, though this is rarely required. */ menu["time"].HelpText += " (UTC)."; // Run menu. The menu will run until quit by the user. Console.WriteLine("Enter \"help\" for help."); Console.WriteLine("Enter \"quit\" to quit (in this case, the next step of this demo will be started)."); menu.Run(); Console.WriteLine("(First menu example completed, starting the next one...)"); }
static ComboMenu() { CMenu.AddGroupLabel("Kombo"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Kullan Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Kullan W")); _useE = CMenu.Add("comboUseE", new CheckBox("Kullan E")); _useR = CMenu.Add("comboUseR", new CheckBox("Kullan R", false)); _turnoffR = CMenu.Add("comboturnoffR", new CheckBox("Eğer R menzilinde düşman yoksa R kapat?")); _MinR = CMenu.Add("comboMinR", new Slider("R için en az düşman", 2, 0, 5)); _manaR = CMenu.Add("comboManaR", new Slider("R için mana %", 15)); _manaE = CMenu.Add("comboManaE", new Slider("E için mana %", 30)); }
static ComboMenu() { CMenu.AddGroupLabel("Combo"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Use Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Use W")); _useE = CMenu.Add("comboUseE", new CheckBox("Use E")); _useR = CMenu.Add("comboUseR", new CheckBox("Use R", false)); _turnoffR = CMenu.Add("comboturnoffR", new CheckBox("Turn off R if no enemies in R range combo?")); _MinR = CMenu.Add("comboMinR", new Slider("Minimum Enemies for R", 2, 0, 5)); _manaR = CMenu.Add("comboManaR", new Slider("Use R until % Mana", 15)); _manaE = CMenu.Add("comboManaE", new Slider("Use E until % Mana", 30)); }
public static void CreateMenu() { Menu = MainMenu.AddMenu("PureTrundle", "Menu"); Menu.AddGroupLabel("PureTrundle By Darakath"); CMenu = Menu.AddSubMenu("Combo", "cMenu"); CMenu.Add("W", new CheckBox("Use W")); CMenu.AddSeparator(); CMenu.Add("E", new CheckBox("Use E")); CMenu.AddSeparator(); CMenu.Add("R", new CheckBox("Use R")); CMenu.AddSeparator(); CMenu.Add("BC", new CheckBox("Use Botrk/Cutlass")); CMenu.AddSeparator(); CMenu.Add("TH", new CheckBox("Use Tiamat/Hydra")); HMenu = Menu.AddSubMenu("Harass", "hMenu"); HMenu.Add("W", new CheckBox("Use W")); HMenu.AddSeparator(); HMenu.Add("E", new CheckBox("Use E")); HMenu.AddSeparator(); HMenu.Add("TH", new CheckBox("Use Tiamat/Hydra")); WMenu = Menu.AddSubMenu("Wave/Jungle Clear", "wMenu"); WMenu.Add("QW", new CheckBox("Use Q for WaveClear", false)); WMenu.AddSeparator(); WMenu.Add("QJ", new CheckBox("Use Q for JungleClear", false)); WMenu.AddSeparator(); WMenu.Add("WW", new CheckBox("Use W for WaveClear", false)); WMenu.AddSeparator(); WMenu.Add("WJ", new CheckBox("Use W for JungleClear", false)); WMenu.AddSeparator(); WMenu.Add("TH", new CheckBox("Use Tiamat/Hydra")); MMenu = Menu.AddSubMenu("Mana", "mMenu"); MMenu.Add("Q", new Slider("Mana for Q")); MMenu.Add("W", new Slider("Mana for W")); MMenu.Add("E", new Slider("Mana for E")); MMenu.Add("R", new Slider("Mana for R")); Menu.AddSeparator(); MMenu.Add("WC", new Slider("Mana for WaveClear")); MMenu.Add("JF", new Slider("Mana for JungleFarm")); MMenu.Add("H", new Slider("Mana for Harass")); DMenu = Menu.AddSubMenu("Drawings", "dMenu"); DMenu.Add("W", new CheckBox("Draw W Range", false)); DMenu.Add("E", new CheckBox("Draw E Range", false)); DMenu.Add("R", new CheckBox("Draw R Range")); DMenu.Add("RD", new CheckBox("HP Bar Indicator (Q+R+AA+Items)")); OMenu = Menu.AddSubMenu("Other", "oMenu"); OMenu.Add("GC", new CheckBox("Auto Anti-GapCloser", false)); }
static ComboMenu() { CMenu.AddGroupLabel("Kombo Ayarları"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Kullan Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Kullan W")); _useE = CMenu.Add("comboUseE", new CheckBox("Kullan E (Düşman İmleçteyse göster)")); _eDistanceIn = CMenu.Add("comboEDistanceIn", new Slider("E Kullan düşman şu menzildeyse(elleme)", 100, 0, 1000)); _eDistanceOut = CMenu.Add("comboEDistanceOut", new Slider("Elleme", 250, 0, 1000)); _curDistance = CMenu.Add("comboCurDistance", new Slider("Elleme", 250, 100, 1000)); CMenu.AddSeparator(); _useR = CMenu.Add("comboUseR", new CheckBox("Kullan R", false)); _rMin = CMenu.Add("comboMinR", new Slider("R için gereken düşman sayısı", 2, 0, 5)); }
static ComboMenu() { CMenu.AddGroupLabel("Combo Options"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Use Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Use W")); _useE = CMenu.Add("comboUseE", new CheckBox("Use E (enemy inside of Cursor drawing)")); _eDistanceIn = CMenu.Add("comboEDistanceIn", new Slider("Use E when enemy is x distance inside E Range", 100, 0, 1000)); _eDistanceOut = CMenu.Add("comboEDistanceOut", new Slider("Use E when enemy is x distance away", 250, 0, 1000)); _curDistance = CMenu.Add("comboCurDistance", new Slider("Start charging E when cursor is x distance from enemy", 250, 100, 1000)); CMenu.AddSeparator(); _useR = CMenu.Add("comboUseR", new CheckBox("Use R", false)); _rMin = CMenu.Add("comboMinR", new Slider("Min. enemies for R", 2, 0, 5)); }
private void CaseSensitivity() { /* * Commands are case *in*sensitive by default. This can be changed using the `StringComparison` property. */ menu.StringComparison = StringComparison.InvariantCulture; menu.Add("Hello", s => Console.WriteLine("Hi!")); Console.WriteLine("The menu is now case sensitive."); menu.Run(); }
public static void CreateMenu() { Menu = MainMenu.AddMenu("redRiven", "Menu"); Menu.AddGroupLabel("redRiven By Darakath"); Menu.AddSeparator(); Menu.AddLabel("A reworked version of dRiven."); CMenu = Menu.AddSubMenu("Combo", "cMenu"); CMenu.Add("q", new CheckBox("Use Q")); CMenu.AddSeparator(); CMenu.Add("w", new CheckBox("Use W")); CMenu.AddSeparator(); CMenu.Add("e", new CheckBox("Use E")); CMenu.AddSeparator(); CMenu.Add("r", new CheckBox("Use R")); CMenu.AddSeparator(); CMenu.Add("r2", new Slider("Use R2 Health Percent", 10)); CMenu.AddSeparator(); CMenu.Add("r1", new Slider("Use R1 Enemies", 2, 0, 5)); HMenu = Menu.AddSubMenu("Harass", "hMenu"); HMenu.Add("q", new CheckBox("Use Q")); HMenu.AddSeparator(); HMenu.Add("w", new CheckBox("Use W")); HMenu.AddSeparator(); HMenu.Add("e", new CheckBox("Use E")); WMenu = Menu.AddSubMenu("WaveClear", "wMenu"); WMenu.Add("q", new CheckBox("Use Q")); WMenu.AddSeparator(); WMenu.Add("w", new CheckBox("Use W")); WMenu.AddSeparator(); WMenu.Add("e", new CheckBox("Use E")); JMenu = Menu.AddSubMenu("JungleClear", "jMenu"); JMenu.Add("q", new CheckBox("Use Q")); JMenu.AddSeparator(); JMenu.Add("w", new CheckBox("Use W")); JMenu.AddSeparator(); JMenu.Add("e", new CheckBox("Use E")); MMenu = Menu.AddSubMenu("Misc", "mMenu"); MMenu.Add("q", new CheckBox("Keep Q")); MMenu.Add("dr", new CheckBox("Draw R Range")); MMenu.Add("hp", new CheckBox("Draw HP Indicator")); }
static void Main(string[] args) { Console.WriteLine("Simple CMenu demonstration"); var mainmenu = new CMenu(); mainmenu.PromptCharacter = "main>"; mainmenu.Add("tutorial", s => new Tutorial().Run()); mainmenu.Add("tree-init", s => TreeInitialization()); mainmenu.Add("disabled", s => DisabledCommands()); mainmenu.Add("promptless", s => PromptlessMode()); mainmenu.Add("immediate", s => ImmediateMode()); mainmenu.Add(new ExamplesMenu()); mainmenu.Add(new OutputHook()); mainmenu.CQ.ImmediateInput("help"); mainmenu.Run(); }
public static void CreateMenu() { Menu = MainMenu.AddMenu("Radiant Leona", "Menu"); Menu.AddGroupLabel("Developed by Darakath"); Menu.AddLabel("Version 1.0.1"); CMenu = Menu.AddSubMenu("Combo", "cMenu"); CMenu.Add("Q", new CheckBox("Use Q")); CMenu.AddSeparator(); CMenu.Add("W", new CheckBox("Use W")); CMenu.AddSeparator(); CMenu.Add("E", new CheckBox("Use E")); CMenu.AddSeparator(); CMenu.Add("R", new CheckBox("Use R")); CMenu.AddSeparator(); CMenu.Add("RE", new Slider("Use R Enemies", 2, 1, 5)); HMenu = Menu.AddSubMenu("Harass", "hMenu"); HMenu.Add("Q", new CheckBox("Use Q")); HMenu.AddSeparator(); HMenu.Add("E", new CheckBox("Use E")); MMenu = Menu.AddSubMenu("Mana", "mMenu"); MMenu.Add("Q", new Slider("Mana for Q")); MMenu.Add("W", new Slider("Mana for W")); MMenu.Add("E", new Slider("Mana for E")); MMenu.Add("R", new Slider("Mana for R")); MMenu.Add("H", new Slider("Mana for Harass")); DMenu = Menu.AddSubMenu("Drawings", "dMenu"); DMenu.Add("Q", new CheckBox("Draw Q Range")); DMenu.Add("W", new CheckBox("Draw W Range")); DMenu.Add("E", new CheckBox("Draw E Range")); DMenu.Add("R", new CheckBox("Draw R Range")); OMenu = Menu.AddSubMenu("Other", "oMenu"); OMenu.Add("G", new CheckBox("Auto QAA on Gapcloser")); OMenu.Add("C", new CheckBox("Auto AA Cancel With Q on Champions")); }
static ComboMenu() { CMenu.AddGroupLabel("Combo"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Use Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Use W")); _useE = CMenu.Add("comboUseE", new CheckBox("Use E")); _useR = CMenu.Add("comboUseR", new CheckBox("Use R", false)); _clone = CMenu.Add("comboclone", new CheckBox("Move Ghost?")); _healthR = CMenu.Add("combohealthR", new Slider("Use R when Health % below", 20)); CMenu.AddLabel("Use R on:"); if (EntityManager.Heroes.Allies.Count > 0) { var addedChamps = new List <string>(); foreach ( var ally in EntityManager.Heroes.Allies.Where(ally => !addedChamps.Contains(ally.ChampionName))) { addedChamps.Add(ally.ChampionName); CMenu.Add(ally.ChampionName, new CheckBox(string.Format("{0}", ally.ChampionName))); } } }
static ComboMenu() { CMenu.AddGroupLabel("Kombo"); _useQ = CMenu.Add("comboUseQ", new CheckBox("Kullan Q")); _useW = CMenu.Add("comboUseW", new CheckBox("Kullan W")); _useE = CMenu.Add("comboUseE", new CheckBox("Kullan E")); _useR = CMenu.Add("comboUseR", new CheckBox("Kullan R", false)); _clone = CMenu.Add("comboclone", new CheckBox("Hayeleti Hareket Ettir?")); _healthR = CMenu.Add("combohealthR", new Slider("R için canım şu kadar %", 20)); CMenu.AddLabel("R için:"); if (EntityManager.Heroes.Allies.Count > 0) { var addedChamps = new List <string>(); foreach ( var ally in EntityManager.Heroes.Allies.Where(ally => !addedChamps.Contains(ally.ChampionName))) { addedChamps.Add(ally.ChampionName); CMenu.Add(ally.ChampionName, new CheckBox(string.Format("{0}", ally.ChampionName))); } } }
private static void Loading_OnLoadingComplete(EventArgs args) { if (ObjectManager.Player.ChampionName != "DrMundo") { return; } _q = new Spell.Skillshot(SpellSlot.Q, 1000, EloBuddy.SDK.Enumerations.SkillShotType.Linear, 250, 1850, 60) { MinimumHitChance = EloBuddy.SDK.Enumerations.HitChance.High }; _q.AllowedCollisionCount = 0; _w = new Spell.Active(SpellSlot.W, 325); _e = new Spell.Active(SpellSlot.E, 150); _r = new Spell.Active(SpellSlot.R); Menu = MainMenu.AddMenu("Dr.Mundo", "Ten Percent Dr.Mundo".ToLower(), "Ten Percent Dr.Mundo"); Menu.AddLabel("Gangnam"); Menu.AddLabel("Ten Percent Dr.Mundo Ver 0.0.0.91 (Beta)"); Menu.AddLabel("Last Update 2016.03.20"); Menu.AddLabel("Plz give me Many FeedBack :)"); Menu.AddLabel("Change Log"); Menu.AddLabel("0.0.0.9 - Release"); Menu.AddLabel("0.0.0.91 - Auto Harass Added"); CMenu = Menu.AddSubMenu("Combo", "CMenu"); CMenu.Add("CQ", new CheckBox("Use Q")); CMenu.Add("CW", new CheckBox("Use W")); CMenu.Add("CE", new CheckBox("Use E")); CMenu.Add("CR", new CheckBox("Use R", false)); CMenu.Add("CH", new Slider("R If HP", 30, 0, 100)); CMenu.AddSeparator(); HMenu = Menu.AddSubMenu("Harass", "HMenu"); HMenu.Add("HQ", new CheckBox("Use Q")); HMenu.Add("HW", new CheckBox("Use W")); HMenu.Add("HE", new CheckBox("Use E")); HMenu.Add("HA", new CheckBox("Auto Harass Q", false)); HMenu.AddSeparator(); LCMenu = Menu.AddSubMenu("LaneClear", "LCMenu"); LCMenu.Add("LCQ", new CheckBox("Use Q")); LCMenu.Add("LCW", new CheckBox("Use W", false)); LCMenu.Add("LCE", new CheckBox("Use E")); LCMenu.AddSeparator(); JCMenu = Menu.AddSubMenu("JungleClear", "JCMenu"); JCMenu.Add("JCQ", new CheckBox("Use Q")); JCMenu.Add("JCW", new CheckBox("Use W", false)); JCMenu.Add("JCE", new CheckBox("Use E")); JCMenu.AddSeparator(); MMenu = Menu.AddSubMenu("Misc", "MMenu"); MMenu.Add("MO", new Slider("Auto W Off If HP", 10, 0, 100)); MMenu.Add("MA", new CheckBox("Smart W Logic")); MMenu.AddSeparator(); DMenu = Menu.AddSubMenu("Drawing", "DMenu"); DMenu.Add("DO", new CheckBox("Disable Drawings", false)); DMenu.Add("DQ", new CheckBox("Draw Q Range")); DMenu.Add("DW", new CheckBox("Draw W Range")); DMenu.Add("DH", new CheckBox("Draw HP")); DMenu.AddSeparator(); Menu.AddSeparator(); Game.OnUpdate += Game_OnUpdate; Orbwalker.OnPostAttack += Orbwalker_OnPostAttack; Drawing.OnDraw += Drawing_OnDraw; }
public ControlledRun(bool passive) { menu.CQ.PassiveMode = passive; menu.Add(new Menu_Print(this)); menu.Add(new Menu_Lib(this)); menu.Add(new Menu_Def(this)); menu.Add(new Menu_Create(this)); menu.Add(new Menu_Step(this)); menu.Add(new Menu_Run(this)); menu.Add(new Menu_Break(this)); menu.Add(new Menu_Stopwatch()); //menu.Add ("log-break", s => Log.AddBreakpoint (s)); menu.Add(new MI_Echo()); menu.Add(new MI_Pause()); var store = new FileRecordStore(); menu.Add(new MI_Record(store) { Selector = "{", EndRecordCommand = "}", }); menu.Add(new MI_Replay(menu, store) { Selector = "!", }); var mi_if = menu.Add(new MI_If()); mi_if.Conditions.Add("hist-has", Condition_HistHas); _Def = DefinitionLibrary.Load("BusyBeaver2"); }