' ####################################################################################
' FloatingMenu MouseClick Detection
' ####################################################################################
' ########## Mouse_Clicked Event #############
'#### Functionality Moved to NativeHook_Static.Mouse_Clicked, sub will still be called if it exists
'Mouse button 2 has been detected by the native hook
Sub Mouse_Clicked(nme As NativeMouseEvent,Pressed As Boolean)
Log("Main mouse Pressed " & nme.MouseButton)
' nme.X,Y changed to x,y
If WhichBank = 1 Then
If nme.MouseButton = 2 And Pressed Then
If FMCurrent.IsInitialized Then FMCurrent.Hide
FMCurrent = FMArr(0)
NativeHook_Static.SetFloatingMenu(FMCurrent)
MainForm.Show
FMCurrent.Show(x,y)
End If
End If
If WhichBank = 2 Then
If nme.MouseButton = 2 And Pressed Then
If FMCurrent.IsInitialized Then FMCurrent.Hide
FMCurrent = FMArr(1)
NativeHook_Static.SetFloatingMenu(FMCurrent)
MainForm.Show
FMCurrent.Show(x,y)
End If
End If
If WhichBank = 3 Then
If nme.MouseButton = 2 And Pressed Then
If FMCurrent.IsInitialized Then FMCurrent.Hide
FMCurrent = FMArr(2)
NativeHook_Static.SetFloatingMenu(FMCurrent)
MainForm.Show
FMCurrent.Show(x,y)
End If
End If
If WhichBank = 4 Then
If nme.MouseButton = 2 And Pressed Then
If FMCurrent.IsInitialized Then FMCurrent.Hide
FMCurrent = FMArr(3)
NativeHook_Static.SetFloatingMenu(FMCurrent)
MainForm.Show
FMCurrent.Show(x,y)
End If
End If
' Middle mouse button
If nme.MouseButton = 3 And Pressed Then
WhichBank = WhichBank + 1
If WhichBank = 0 Or WhichBank >= 5 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #1 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu1
End If
If WhichBank = 2 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #2 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu2
End If
If WhichBank = 3 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #3 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu3
End If
If WhichBank = 4 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #4 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu4
End If
If WhichBank >=5 Then
WhichBank = 1
End If
End If
' Mouse button #4 Count upwards
If nme.MouseButton = 4 And Pressed Then
WhichBank = WhichBank + 1
If WhichBank = 0 Or WhichBank >= 5 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #1 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu1
End If
If WhichBank = 2 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #2 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu2
End If
If WhichBank = 3 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #3 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu3
End If
If WhichBank = 4 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #4 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu4
End If
If WhichBank >=5 Then
WhichBank = 1
End If
End If
' Mouse button #5 Count downwards
If nme.MouseButton = 5 And Pressed Then
WhichBank = WhichBank - 1
If WhichBank <= 0 Or WhichBank > 4 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #4 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu4
End If
If WhichBank = 1 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #1 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu1
End If
If WhichBank = 2 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #2 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu2
End If
If WhichBank = 3 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #3 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu3
End If
If WhichBank = 4 Then
FXnotify.ShowNotification4("Mindcraft", "Menu #4 selected.", NotifyIcon, "CENTER", 2000)
Speech.Menu4
End If
If WhichBank <=0 Then
WhichBank = 4
End If
End If
End Sub