コード例 #1
0
ファイル: Program.cs プロジェクト: volder1/EloBuddy
        /// <summary>
        /// Called when Game finishes loading.
        /// </summary>
        /// <param name="args">The Loading Args</param>
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (Game.MapId != GameMapId.SummonersRift)
            {
                return;
            }

            try
            {
                sWard       = new Item(2044, WardRange);
                vWard       = new Item(2043, WardRange);
                sightStone  = new Item(2049, WardRange);
                rSightStone = new Item(2045, WardRange);
                trinket     = new Item(3340, WardRange);
                gsT         = new Item(3361, WardRange);
                gvT         = new Item(3362, WardRange);

                WardBuddy = MainMenu.AddMenu("WardBuddy", "WardBuddy");

                FileHandlerMenu = WardBuddy.AddSubMenu("FileHandler", "FileHandler");
                FileHandlerMenu.AddGroupLabel("FileHandler Settings");
                FileHandlerMenu.AddSeparator();
                FileHandlerMenu.Add("toggleC", new CheckBox("Use Custom Locations"));
                FileHandlerMenu.Add("toggleD", new CheckBox("Use Default Locations"));

                WardMenu = WardBuddy.AddSubMenu("Ward", "Ward");
                WardMenu.AddGroupLabel("Ward Settings");
                WardMenu.AddSeparator();
                WardMenu.Add("normal", new CheckBox("Use Normal Ward"));
                WardMenu.Add("pink", new CheckBox("Use Pink Ward"));
                WardMenu.AddSeparator();
                WardMenu.AddGroupLabel("How should the Ward be placed?");
                WardMenu.Add("always", new CheckBox("Always ward any position", false));
                WardMenu.Add("usekey", new CheckBox("Use keybind to ward nearest ward."));
                WardMenu.Add("key", new KeyBind("Place ward with keybind", false, KeyBind.BindTypes.HoldActive, "Z".ToCharArray()[0]));

                DrawingMenu = WardBuddy.AddSubMenu("Drawing", "Drawing");
                DrawingMenu.AddGroupLabel("Drawing Settings");
                DrawingMenu.AddSeparator();
                DrawingMenu.Add("normal", new CheckBox("Draw Normal Ward Positions"));
                DrawingMenu.Add("pink", new CheckBox("Draw Pink Ward Positions"));
                DrawingMenu.AddSeparator();
                DrawingMenu.AddGroupLabel("Debug Settings");
                DrawingMenu.Add("text", new CheckBox("Draw Player Coordinates"));
                DrawingMenu.Add("x", new Slider("X", 500, 0, 1920));
                DrawingMenu.Add("y", new Slider("Y", 500, 0, 1080));

                Chat.Print("WardBuddy Initialized by KarmaPanda");

                wardLocation = new WardLocation();
                Handler      = new FileHandler();

                Game.OnTick    += Game_OnTick;
                Drawing.OnDraw += Drawing_OnDraw;
            }
            catch (Exception e)
            {
                Chat.Print("Failed to Initialize WardBuddy. Exception: " + e.Message);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: kunoz/EloBuddy
        /// <summary>
        /// Called when Game finishes loading.
        /// </summary>
        /// <param name="args">The Loading Args</param>
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (Game.MapId != GameMapId.SummonersRift)
            {
                return;
            }

            try
            {
                sWard = new Item(2044, WardRange);
                vWard = new Item(2043, WardRange);
                sightStone = new Item(2049, WardRange);
                rSightStone = new Item(2045, WardRange);
                trinket = new Item(3340, WardRange);
                gsT = new Item(3361, WardRange);
                gvT = new Item(3362, WardRange);

                WardBuddy = MainMenu.AddMenu("WardBuddy", "WardBuddy");

                FileHandlerMenu = WardBuddy.AddSubMenu("FileHandler", "FileHandler");
                FileHandlerMenu.AddGroupLabel("FileHandler Settings");
                FileHandlerMenu.AddSeparator();
                FileHandlerMenu.Add("toggleC", new CheckBox("Use Custom Locations"));
                FileHandlerMenu.Add("toggleD", new CheckBox("Use Default Locations"));
                
                WardMenu = WardBuddy.AddSubMenu("Ward", "Ward");
                WardMenu.AddGroupLabel("Ward Settings");
                WardMenu.AddSeparator();
                WardMenu.Add("normal", new CheckBox("Use Normal Ward"));
                WardMenu.Add("pink", new CheckBox("Use Pink Ward"));
                WardMenu.AddSeparator();
                WardMenu.AddGroupLabel("How should the Ward be placed?");
                WardMenu.Add("always", new CheckBox("Always ward any position", false));
                WardMenu.Add("usekey", new CheckBox("Use keybind to ward nearest ward."));
                WardMenu.Add("key", new KeyBind("Place ward with keybind", false, KeyBind.BindTypes.HoldActive, "Z".ToCharArray()[0]));

                DrawingMenu = WardBuddy.AddSubMenu("Drawing", "Drawing");
                DrawingMenu.AddGroupLabel("Drawing Settings");
                DrawingMenu.AddSeparator();
                DrawingMenu.Add("normal", new CheckBox("Draw Normal Ward Positions"));
                DrawingMenu.Add("pink", new CheckBox("Draw Pink Ward Positions"));
                DrawingMenu.AddSeparator();
                DrawingMenu.AddGroupLabel("Debug Settings");
                DrawingMenu.Add("text", new CheckBox("Draw Player Coordinates"));
                DrawingMenu.Add("x", new Slider("X", 500, 0, 1920));
                DrawingMenu.Add("y", new Slider("Y", 500, 0, 1080));

                Chat.Print("WardBuddy Initialized by KarmaPanda");

                wardLocation = new WardLocation();
                Handler = new FileHandler();

                Game.OnTick += Game_OnTick;
                Drawing.OnDraw += Drawing_OnDraw;
            }
            catch (Exception e)
            {
                Chat.Print("Failed to Initialize WardBuddy. Exception: " + e.Message);
            }
        }