diff --git a/DrawPool/Controls/PoolView.xaml b/DrawPool/Controls/PoolView.xaml
index cd0f0f3..589f883 100644
--- a/DrawPool/Controls/PoolView.xaml
+++ b/DrawPool/Controls/PoolView.xaml
@@ -83,7 +83,7 @@
Width="35"
Height="20"
FontSize="12"
- Text="0%"
+ Text=""
TextAlignment="Right" />
diff --git a/DrawPool/Controls/SettingsView.xaml b/DrawPool/Controls/SettingsView.xaml
index 0c73eff..f35da0d 100644
--- a/DrawPool/Controls/SettingsView.xaml
+++ b/DrawPool/Controls/SettingsView.xaml
@@ -9,7 +9,7 @@
xmlns:props="clr-namespace:DrawPool.Properties"
lex:LocalizeDictionary.DesignCulture="en"
lex:ResxLocalizationProvider.DefaultAssembly="DrawPool"
- lex:ResxLocalizationProvider.DefaultDictionary="DrawPoolStringTools"
+ lex:ResxLocalizationProvider.DefaultDictionary="DrawPool.Logic.StringTools"
BorderThickness="1"
VerticalScrollBarVisibility="Hidden"
mc:Ignorable="d">
diff --git a/DrawPool/Controls/SettingsView.xaml.cs b/DrawPool/Controls/SettingsView.xaml.cs
index 990b531..7bb52cc 100644
--- a/DrawPool/Controls/SettingsView.xaml.cs
+++ b/DrawPool/Controls/SettingsView.xaml.cs
@@ -1,7 +1,7 @@
namespace DrawPool.Controls
{
- using DrawPool.DrawLogic;
- using DrawPool.Logic;
+ using global::DrawPool.DrawLogic;
+ using global::DrawPool.Logic;
using MahApps.Metro.Controls;
using System;
using System.Collections.Generic;
@@ -67,7 +67,7 @@ private void BtnShowHide_Click(object sender, RoutedEventArgs e)
private void BtnUnlock_Click(object sender, RoutedEventArgs e)
{
- IsUnlocked = PluginInstance.inputMoveManager.Toggle();
+ IsUnlocked = DrawPool.inputMoveManager.Toggle();
if (!IsUnlocked)
{
BtnUnlock.Content = StringTools.GetLocalized("UnlockLabel");
diff --git a/DrawPool/PluginInstance.cs b/DrawPool/DrawPool.cs
similarity index 91%
rename from DrawPool/PluginInstance.cs
rename to DrawPool/DrawPool.cs
index 113f97a..5a9f76d 100644
--- a/DrawPool/PluginInstance.cs
+++ b/DrawPool/DrawPool.cs
@@ -9,17 +9,15 @@
namespace DrawPool
{
- public class PluginInstance : IDisposable
+ public class DrawPool : IDisposable
{
public static InputMoveManager inputMoveManager;
public MinstrelPool minstrelPool;
- public PluginInstance()
+ public DrawPool()
{
minstrelPool = new MinstrelPool();
minstrelPool.Name = "MinstrelPoolView";
- // minstrelPool.Height = minstrelPool.ActualHeight;
- // minstrelPool.Width = minstrelPool.ActualWidth;
Core.OverlayCanvas.Children.Add(minstrelPool);
Settings.Default.DrawPoolTop = CheckDefault(Settings.Default.DrawPoolTop);
diff --git a/DrawPool/DrawPool.csproj b/DrawPool/DrawPool.csproj
index 72d23c9..742926c 100644
--- a/DrawPool/DrawPool.csproj
+++ b/DrawPool/DrawPool.csproj
@@ -63,12 +63,11 @@
SettingsView.xaml
-
-
+
True
diff --git a/DrawPool/DrawPoolPlugin.cs b/DrawPool/DrawPoolPlugin.cs
index 15eddb8..6c44e32 100644
--- a/DrawPool/DrawPoolPlugin.cs
+++ b/DrawPool/DrawPoolPlugin.cs
@@ -1,7 +1,7 @@
namespace DrawPool
{
- using DrawPool.DrawViews;
- using DrawPool.Logic;
+
+ using global::DrawPool.Logic;
using global::DrawPool.Controls;
using Hearthstone_Deck_Tracker.Plugins;
using System;
@@ -16,7 +16,7 @@
///
public class DrawPoolPlugin : IPlugin
{
- public PluginInstance pluginInstance;
+ public DrawPool drawPoolInstance;
///
/// The author.
@@ -94,7 +94,7 @@ protected void CheckForDefaultSettings()
public void OnLoad()
{
- pluginInstance = new PluginInstance();
+ drawPoolInstance = new DrawPool();
AddMenuItem();
}
@@ -105,8 +105,8 @@ public void OnUnload()
{
Settings.Default.Save();
- pluginInstance?.CleanUp();
- pluginInstance = null;
+ drawPoolInstance?.CleanUp();
+ drawPoolInstance = null;
}
///
diff --git a/DrawPool/DrawViews/MinstrelPool.cs b/DrawPool/DrawViews/MinstrelPool.cs
index 4dec2ee..d7c0930 100644
--- a/DrawPool/DrawViews/MinstrelPool.cs
+++ b/DrawPool/DrawViews/MinstrelPool.cs
@@ -12,8 +12,8 @@
///
/// The Minstrel DrawPool View
///
- ///
- ///
+ ///
+ ///
public class MinstrelPool : PoolView, ICommonView
{
public MinstrelPool()
@@ -28,8 +28,8 @@ public MinstrelPool()
///
public void DoMath()
{
- this.Chance1.Text = "0%";
- this.Chance2.Text = "0%";
+ this.Chance1.Text = "";
+ this.Chance2.Text = "";
if (MinionCount() >= 1)
{
var gm = GroupedMinion();
diff --git a/DrawPool/Logic/InputMoveManager.cs b/DrawPool/Logic/InputMoveManager.cs
index b5b7cdf..c62e025 100644
--- a/DrawPool/Logic/InputMoveManager.cs
+++ b/DrawPool/Logic/InputMoveManager.cs
@@ -13,9 +13,9 @@ public class InputMoveManager
private bool _selected = false;
private StackPanel _StackPanel;
- public InputMoveManager(StackPanel player)
+ public InputMoveManager(StackPanel panel)
{
- _StackPanel = player;
+ _StackPanel = panel;
}
private void MouseInputOnLmbDown(object sender, EventArgs eventArgs)
@@ -35,14 +35,18 @@ private void MouseInputOnLmbDown(object sender, EventArgs eventArgs)
private void MouseInputOnLmbUp(object sender, EventArgs eventArgs)
{
var pos = User32.GetMousePos();
-
var _mousePos = new Point(pos.X, pos.Y);
if (_selected)
{
var p = Core.OverlayCanvas.PointFromScreen(new Point(pos.X, pos.Y));
-
- Settings.Default.DrawPoolTop = p.Y;
- Settings.Default.DrawPoolLeft = p.X;
+ if (pos.X > Core.OverlayCanvas.Width)
+ {
+ Settings.Default.DrawPoolLeft = p.X;
+ }
+ if (pos.Y > Core.OverlayCanvas.Height)
+ {
+ Settings.Default.DrawPoolTop = p.Y;
+ }
}
_selected = false;
@@ -57,9 +61,14 @@ private void MouseInputOnMouseMoved(object sender, EventArgs eventArgs)
var pos = User32.GetMousePos();
var p = Core.OverlayCanvas.PointFromScreen(new Point(pos.X, pos.Y));
-
- Canvas.SetTop(_StackPanel, p.Y);
- Canvas.SetLeft(_StackPanel, p.X);
+ if (pos.X > Core.OverlayCanvas.Width)
+ {
+ Canvas.SetLeft(_StackPanel, p.X);
+ }
+ if (pos.Y > Core.OverlayCanvas.Height)
+ {
+ Canvas.SetTop(_StackPanel, p.Y);
+ }
}
private bool PointInsideControl(Point p, FrameworkElement control)
diff --git a/DrawPool/Logic/PluginManager.cs b/DrawPool/Logic/PluginManager.cs
deleted file mode 100644
index cdadc77..0000000
--- a/DrawPool/Logic/PluginManager.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Hearthstone_Deck_Tracker.API;
-using Hearthstone_Deck_Tracker.Controls;
-using Card = Hearthstone_Deck_Tracker.Hearthstone.Card;
-using Core = Hearthstone_Deck_Tracker.API.Core;
-
-namespace DrawPool.DrawViews
-{
- public class PluginManager
- {
- public PluginManager()
- {
- GameEvents.OnGameStart.Add(GameTypeCheck);
- GameEvents.OnGameEnd.Add(CleanUp);
- }
-
- private void GameTypeCheck()
- {
- if (Core.Game.CurrentGameType == HearthDb.Enums.GameType.GT_RANKED ||
- Core.Game.CurrentGameType == HearthDb.Enums.GameType.GT_CASUAL ||
- Core.Game.CurrentGameType == HearthDb.Enums.GameType.GT_ARENA)
- {
- InitLogic();
- }
- }
-
- private void InitLogic()
- {
-
- }
-
- private void CleanUp()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/DrawPool/Resources/DrawPoolStrings.en.resx b/DrawPool/Resources/DrawPoolStrings.en.resx
new file mode 100644
index 0000000..a2735f3
--- /dev/null
+++ b/DrawPool/Resources/DrawPoolStrings.en.resx
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Hide
+
+
+ Lock
+
+
+ Minstrel
+
+
+ Lock
+
+
+ Opacity
+
+
+ Piper
+
+
+ Helps to see scoped draw pools from the current cards in your deck.
+
+
+ DrawPool
+
+
+ Scale
+
+
+ Settings
+
+
+ Show
+
+
+ Unlock
+
+
\ No newline at end of file