diff --git a/ArkH/ArkH.vbproj b/ArkH/ArkH.vbproj
index b79c56b..b5b1bd9 100644
--- a/ArkH/ArkH.vbproj
+++ b/ArkH/ArkH.vbproj
@@ -82,6 +82,9 @@
MSBuild:CompileDesigner
+
+ ClearOverlay.xaml
+
@@ -92,6 +95,10 @@
Overlay.xaml
+
+ Designer
+ MSBuild:Compile
+ MSBuild:CompileDesigner
diff --git a/ArkH/ClearOverlay.xaml b/ArkH/ClearOverlay.xaml
new file mode 100644
index 0000000..265e815
--- /dev/null
+++ b/ArkH/ClearOverlay.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ArkH/ClearOverlay.xaml.vb b/ArkH/ClearOverlay.xaml.vb
new file mode 100644
index 0000000..684a3d1
--- /dev/null
+++ b/ArkH/ClearOverlay.xaml.vb
@@ -0,0 +1,39 @@
+Public Class ClearOverlay
+
+
+ Public Sub refreshOL()
+ updateglobalstate()
+
+
+
+
+
+
+ OLstack.Children.Clear()
+ OLstack.Children.Add(lblTitle)
+ If globvar_eventactive = True Then
+ lblEvent.Text = globvar_eventmessage
+ 'lblEvent.HorizontalContentAlignment = HorizontalAlignment.Center
+ 'txtEvent.Text = globvar_eventmessage
+ OLstack.Children.Add(lblEvent)
+ End If
+ If globvar_globalstate = False Then
+ OLstack.Children.Add(lblHelp)
+ End If
+ If globvar_autowalkstate = True Then
+ OLstack.Children.Add(btnAutoWalk)
+
+ End If
+ If globvar_matehelperstate = True Then
+ OLstack.Children.Add(btnMateHelper)
+ End If
+
+ End Sub
+
+ Private Sub ClearOverlay_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
+ Me.Left = 10
+ Me.Top = 10
+ refreshOL()
+
+ End Sub
+End Class
diff --git a/ArkH/GetWebAPIinfo.vb b/ArkH/GetWebAPIinfo.vb
index 450cf93..a5b1ee9 100644
--- a/ArkH/GetWebAPIinfo.vb
+++ b/ArkH/GetWebAPIinfo.vb
@@ -33,18 +33,52 @@ Module getWebAPIinfo
Private Sub findEvents()
Dim Substrings() As String = globvar_APInews.Split(vbCrLf)
- globvar_eventmessage = ""
+ globvar_eventmessage = "Event NOT active"
globvar_eventactive = False
For Each substring In Substrings
'MsgBox(substring)
- If substring.Contains("Phoenix") = True Then
+ If substring.Contains("EVOLUTION") = True Then
+
+
+ If substring.Contains("1.5X") = True Then
+ globvar_eventmessage = "Event: 1.5x until" & vbCrLf & analyzenews(substring)
+ ElseIf substring.Contains("2X") = True Then
+ globvar_eventmessage = "Event: 2x until" & vbCrLf & analyzenews(substring)
+
+ 'MsgBox("Found")
+ 'MsgBox(analyzenews(substring))
+
+ ElseIf substring.Contains("3X") = True Then
+ globvar_eventmessage = "Event: 3x until" & vbCrLf & analyzenews(substring)
+
+
+
+ End If
+
globvar_eventactive = True
- globvar_eventmessage = substring
+ 'globvar_eventmessage = substring
' MsgBox(substring)
Else
End If
Next
+
' MsgBox(globvar_eventmessage)
End Sub
+
+ Private Function analyzenews(ByVal news As String)
+ Dim retnews As String
+ Dim p1 As Integer
+ Dim p2 As Integer
+
+ p1 = InStr(1, news, "through")
+ ' MsgBox(p1 & vbCrLf & p2)
+
+ retnews = Mid(news, p1 + 8)
+ p2 = InStr(1, retnews, ", with")
+
+ retnews = Left(retnews, p2 - 1)
+ Return retnews
+
+ End Function
End Module
\ No newline at end of file
diff --git a/ArkH/MainWindow.xaml b/ArkH/MainWindow.xaml
index 0f2c5fd..5bad1b6 100644
--- a/ArkH/MainWindow.xaml
+++ b/ArkH/MainWindow.xaml
@@ -64,13 +64,17 @@
-
+
+
+
+
+
diff --git a/ArkH/MainWindow.xaml.vb b/ArkH/MainWindow.xaml.vb
index d4b24cf..1515d22 100644
--- a/ArkH/MainWindow.xaml.vb
+++ b/ArkH/MainWindow.xaml.vb
@@ -1,10 +1,13 @@
Imports System.ComponentModel
Imports System.IO
-Imports System.Runtime.InteropServices
+Imports Microsoft.Win32
Class MainWindow
- Dim overlaywin As New Overlay()
- Dim notifywin As New Notification()
+ ' Dim notifywin As New Notification()
+ Dim clearol As New ClearOverlay()
+
+
+
Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal nVirtKey As keys) As Short
Private WithEvents Bgworker As New ComponentModel.BackgroundWorker
@@ -318,20 +321,26 @@ Class MainWindow
If globvar_enableoverlay = True Then
- notifywin.Show()
+ 'notifywin.Show()
+ 'test
+ clearol.Show()
- overlaywin.Show()
- notifywin.screenmessage()
- overlaywin.OL_Update()
+ 'clearol.Show()
+ 'notifywin.screenmessage()
+
+ clearol.refreshOL()
+
chkEnableOverlay.IsChecked = True
Else
chkEnableOverlay.IsChecked = False
- overlaywin.Hide()
- notifywin.Hide()
+ 'clearol.Hide()
+ 'notifywin.Hide()
+ clearol.Hide()
End If
- overlaywin.OL_Update()
- notifywin.screenmessage()
+ clearol.refreshOL()
+
+ 'notifywin.screenmessage()
'binds
txtKeyForward.Text = bind_forward
txtKeyUse.Text = bind_use
@@ -393,6 +402,7 @@ Class MainWindow
If globvar_matehelperstate = True Then
AppActivate(globvar_gamewindowname)
keycodepress(ConvertCharToVirtualKey(txtKeyWhistle.Text))
+ keycoderelease(ConvertCharToVirtualKey(txtKeyWhistle.Text))
End If
@@ -410,6 +420,7 @@ Class MainWindow
If GetAsyncKeyState(keys.VK_LMENU) <> 0 Then
togglemainwin()
End If
+ clearol.refreshOL()
End Sub
Private Sub action_tickm()
Bgworker.RunWorkerAsync()
@@ -423,12 +434,12 @@ Class MainWindow
Public Sub toggleautowalk()
If globvar_autowalkstate = False Then
globvar_autowalkstate = True
- 'overlaywin.toggleautowalkbutton(True)
- overlaywin.OL_Update()
+ 'clearol.toggleautowalkbutton(True)
+ clearol.refreshOL()
Else
globvar_autowalkstate = False
- overlaywin.OL_Update()
- 'overlaywin.toggleautowalkbutton(False)
+ clearol.refreshOL()
+ 'clearol.toggleautowalkbutton(False)
'keyrelease(keys.VK_W)
keycoderelease(ConvertCharToVirtualKey(txtKeyForward.Text))
End If
@@ -437,10 +448,10 @@ Class MainWindow
Public Sub togglematehelper()
If globvar_matehelperstate = False Then
globvar_matehelperstate = True
- overlaywin.OL_Update()
+ clearol.refreshOL()
Else
globvar_matehelperstate = False
- overlaywin.OL_Update()
+ clearol.refreshOL()
keycoderelease(ConvertCharToVirtualKey(txtKeyWhistle.Text))
End If
updateglobalstate()
@@ -630,8 +641,8 @@ Class MainWindow
Private Sub MainWindow_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
writeoptions()
- overlaywin.Close()
- notifywin.Close()
+ clearol.Close()
+ 'notifywin.Close()
End Sub
Private Sub btnSetDefault_Click(sender As Object, e As RoutedEventArgs) Handles btnSetDefault.Click
@@ -645,12 +656,12 @@ Class MainWindow
Private Sub chkEnableOverlay_Checked(sender As Object, e As RoutedEventArgs) Handles chkEnableOverlay.Checked
globvar_enableoverlay = True
- overlaywin.Show()
+ clearol.Show()
End Sub
Private Sub chkEnableOverlay_Unchecked(sender As Object, e As RoutedEventArgs) Handles chkEnableOverlay.Unchecked
globvar_enableoverlay = False
- overlaywin.Hide()
+ clearol.Hide()
End Sub
Private Function getkeycode(ByVal s As String) As keys
@@ -863,4 +874,11 @@ Class MainWindow
Private Sub btnExit_Click(sender As Object, e As RoutedEventArgs) Handles btnExit.Click
Me.Close()
End Sub
+
+ Private Sub btnBrowsePathToGame_Click(sender As Object, e As RoutedEventArgs) Handles btnBrowsePathToGame.Click
+ Dim openfiledialog As New OpenFileDialog()
+ If openfiledialog.ShowDialog() = True Then
+ txtPathToGame.Text = Path.GetFullPath(openfiledialog.FileName)
+ End If
+ End Sub
End Class