diff --git a/HDT-BGhelper/BGhelper.cs b/HDT-BGhelper/BGhelper.cs index 87ebb01..f84739b 100644 --- a/HDT-BGhelper/BGhelper.cs +++ b/HDT-BGhelper/BGhelper.cs @@ -1,12 +1,13 @@ using System; +using System.Drawing; using System.Runtime.InteropServices; -using Hearthstone_Deck_Tracker; using static Hearthstone_Deck_Tracker.User32; namespace HDT_BGhelper { internal class BGhelper { + private MouseHook hsHook = null; private const int WM_LBUTTONDOWN = 0x201; private const int WM_LBUTTONUP = 0x202; private const double rx = 1130.0 / 1920.0; @@ -14,8 +15,6 @@ internal class BGhelper private const double fx = 1240.0 / 1920.0; private const double fy = 170.0 / 1080.0; - private MouseHook hsHook = null; - [DllImport("user32.dll")] private static extern void SetCursorPos(int x, int y); @@ -50,10 +49,11 @@ private void HsHook_RmbDown(object sender, EventArgs e) { if (IsHearthstoneInForeground()) { - int x = (int)(Core.Overlay.Left); - int y = (int)(Core.Overlay.Top); - int dx = (int)(Core.Overlay.RenderSize.Width * rx); - int dy = (int)(Core.Overlay.RenderSize.Height * ry); + Rectangle hsRect = GetHearthstoneRect(true); + int x = hsRect.X; + int y = hsRect.Y; + int dx = (int)(hsRect.Width * rx); + int dy = (int)(hsRect.Height * ry); var handle = GetHearthstoneWindow(); var lparam = CreateLParam(dx, dy); var oripos = GetMousePos(); @@ -69,10 +69,11 @@ private void HsHook_MmbDown(object sender, EventArgs e) { if (IsHearthstoneInForeground()) { - int x = (int)(Core.Overlay.Left); - int y = (int)(Core.Overlay.Top); - int dx = (int)(Core.Overlay.RenderSize.Width * fx); - int dy = (int)(Core.Overlay.RenderSize.Height * fy); + Rectangle hsRect = GetHearthstoneRect(true); + int x = hsRect.X; + int y = hsRect.Y; + int dx = (int)(hsRect.Width * fx); + int dy = (int)(hsRect.Height * fy); var handle = GetHearthstoneWindow(); var lparam = CreateLParam(dx, dy); var oripos = GetMousePos(); diff --git a/HDT-BGhelper/BGhelperPlugin.cs b/HDT-BGhelper/BGhelperPlugin.cs index a9207cf..fe54eb8 100644 --- a/HDT-BGhelper/BGhelperPlugin.cs +++ b/HDT-BGhelper/BGhelperPlugin.cs @@ -58,7 +58,7 @@ public void OnUpdate() public Version Version { - get { return new Version(1, 4); } + get { return new Version(1, 5); } } } } \ No newline at end of file diff --git a/HDT-BGhelper/Properties/AssemblyInfo.cs b/HDT-BGhelper/Properties/AssemblyInfo.cs index 2c2207a..72be70d 100644 --- a/HDT-BGhelper/Properties/AssemblyInfo.cs +++ b/HDT-BGhelper/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4")] -[assembly: AssemblyFileVersion("1.4")] +[assembly: AssemblyVersion("1.5")] +[assembly: AssemblyFileVersion("1.5")]