Skip to content

Commit

Permalink
version 1.5
Browse files Browse the repository at this point in the history
See release for details.
  • Loading branch information
IBM5100o committed Oct 26, 2023
1 parent b04d8bc commit dc29a96
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
23 changes: 12 additions & 11 deletions HDT-BGhelper/BGhelper.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
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;
private const double ry = 200.0 / 1080.0;
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);

Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion HDT-BGhelper/BGhelperPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void OnUpdate()

public Version Version
{
get { return new Version(1, 4); }
get { return new Version(1, 5); }
}
}
}
4 changes: 2 additions & 2 deletions HDT-BGhelper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

0 comments on commit dc29a96

Please sign in to comment.