private void onMouseClick(object sender, MouseEventExtArgs e) { WindowManager.Rect rect = windowManager.GetWindowPos(); MouseManager.MousePoint point = mouseManager.GetCursorPosition(); Debug.WriteLine((point.X - rect.Left).ToString() + " " + (point.Y - rect.Top).ToString()); }
private void clickRune(Runes rune, bool isInChampSelect, int sleepTime, bool indentLeft = false) { WindowManager.Rect rect = windowManager.GetWindowPos(); if (indentLeft) { rune.position.x -= 50; } Position convertedPos = Runes.TransferPositionResolution(rune.position, 1600, 900, rect.Right - rect.Left, rect.Bottom - rect.Top); if (isInChampSelect == true && !rune.position.alreadyTranslated) { convertedPos.x += (int)(0.085 * (rect.Right - rect.Left)); } mouseManager.SetCursorPosition(rect.Left + convertedPos.x, rect.Top + convertedPos.y); mouseManager.Click(); Thread.Sleep(sleepTime); }