protected void UpdateAttachWindowOffset() { if (_gameMemory.Emulator.GameWindowHandle == IntPtr.Zero) { return; } Utilities.Rect rect = WinEventHook.GetWindowRect(_gameMemory.Emulator.GameWindowHandle); Properties.Settings.Default.YOffset = (int)(rect.Top - Top); Properties.Settings.Default.XOffset = (int)(rect.Left - Left); }
protected void UpdateAttachWindowPosition() { if (_gameMemory.Emulator.GameWindowHandle == IntPtr.Zero) { return; } Utilities.Rect rect = WinEventHook.GetWindowRect(_gameMemory.Emulator.GameWindowHandle); _isAttachWindowUpdate = true; Top = rect.Top - Properties.Settings.Default.YOffset; Left = rect.Left - Properties.Settings.Default.XOffset; _isAttachWindowUpdate = false; }