adding stash calibration
This commit is contained in:
parent
23c581cff9
commit
3ae65d0e64
17 changed files with 848 additions and 111 deletions
38
src/Poe2Trade.Ui/Overlay/OverlayWindow.axaml.cs
Normal file
38
src/Poe2Trade.Ui/Overlay/OverlayWindow.axaml.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using Avalonia.Controls;
|
||||
using Poe2Trade.Bot;
|
||||
|
||||
namespace Poe2Trade.Ui.Overlay;
|
||||
|
||||
public partial class OverlayWindow : Window
|
||||
{
|
||||
private readonly BotOrchestrator _bot = null!;
|
||||
|
||||
// Designer/XAML loader requires parameterless constructor
|
||||
public OverlayWindow() => InitializeComponent();
|
||||
|
||||
public OverlayWindow(BotOrchestrator bot)
|
||||
{
|
||||
_bot = bot;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnOpened(EventArgs e)
|
||||
{
|
||||
base.OnOpened(e);
|
||||
|
||||
// Position at top-left corner
|
||||
Position = new Avalonia.PixelPoint(0, 0);
|
||||
|
||||
// Apply Win32 click-through extended styles
|
||||
if (TryGetPlatformHandle() is { } handle)
|
||||
OverlayNativeMethods.MakeClickThrough(handle.Handle);
|
||||
|
||||
Canvas.Initialize(_bot);
|
||||
}
|
||||
|
||||
protected override void OnClosing(WindowClosingEventArgs e)
|
||||
{
|
||||
Canvas.Shutdown();
|
||||
base.OnClosing(e);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue