private void MoveToMouseCheckBox_CheckedChanged(object sender, EventArgs e) { if (MoveToMouseCheckBox.Checked) { this.Hide(); NativeImport.SetForegroundWindow(Utils.GetLeagueProcess().MainWindowHandle); Thread.Sleep(1000); //Prevents instant IssueOrder when League window isn't active. Game.Engine.IssueOrder(Enums.GameObjectOrder.MoveTo); } }
private static void DrawMenu() { if (Utils.IsKeyPressed(System.Windows.Forms.Keys.Insert) && IsMenuBeingDrawn == false) { Program.MenuBasePlate.Show(); NativeImport.SetForegroundWindow(Program.MenuBasePlate.Handle); IsMenuBeingDrawn = true; } else { if (IsMenuBeingDrawn == true) { Program.MenuBasePlate.Hide(); } IsMenuBeingDrawn = false; } }