Skip to content

Commit

Permalink
0.8.0 release
Browse files Browse the repository at this point in the history
* Changed minion targetting code
  • Loading branch information
topher-au committed Aug 31, 2015
1 parent 765d79c commit f5e1dbb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
8 changes: 5 additions & 3 deletions HDT-Voice/HDTPlugin/HDTVoicePlugin.vb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ Public Class HDTVoicePlugin
End Get
End Property
Public Sub OnButtonPress() Implements IPlugin.OnButtonPress
'Recurse through treeview elements to find HDT-Voice and select it
Dim tV As TreeView = Nothing
For Each t As TreeView In FindVisualChildren(Of TreeView)(Helper.OptionsMain)
For Each ti As TreeViewItem In t.Items
For Each tic As TreeViewItem In ti.Items
For Each t As TreeView In FindVisualChildren(Of TreeView)(Helper.OptionsMain) ' TreeViews in options window
For Each ti As TreeViewItem In t.Items ' Main treeview items
For Each tic As TreeViewItem In ti.Items ' SubItems
If Not tic.Tag Is Nothing Then
If tic.Tag.ToString = "HDTVOICESETTINGS" Then
ti.Items.Cast(Of TreeViewItem).First().IsSelected = True
Expand Down Expand Up @@ -238,6 +239,7 @@ Public Class HDTVoicePlugin
End Try
If cc IsNot Nothing Then
cc.Content = pane
Return
End If
Next

Expand Down
19 changes: 10 additions & 9 deletions HDT-Voice/HDTVoice/HDTMouse.vb
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,26 @@ Public Class Mouse
If targetEntity.IsInPlay And targetEntity.IsMinion And targetEntity.GetTag(GAME_TAG.CONTROLLER) = PlayerID Then
Dim minionNum As Integer = targetEntity.GetTag(GAME_TAG.ZONE_POSITION)
Dim totalMinions As Integer = boardFriendly.Count
Dim totalWidth = totalMinions * 10
Dim minionX = minionNum * 10
Dim minionWidth As Double = 29 / 3
Dim totalWidth As Double = totalMinions * minionWidth
Dim minionX As Double = (minionNum * minionwidth) - (minionWidth / 2)

Dim minX = 50 - (totalWidth / 2) + minionX - 7 + XOffset
MoveTo(minX, 55)
Dim cursorX As Integer = 50 - (totalWidth / 2) + minionX + XOffset
MoveTo(cursorX, 55)
Return
End If

'Then, check whether it is an opposing minion
If targetEntity.IsInPlay And targetEntity.IsMinion And targetEntity.GetTag(GAME_TAG.CONTROLLER) = OpponentID Then
Dim minionNum As Integer = targetEntity.GetTag(GAME_TAG.ZONE_POSITION)
Dim totalMinions As Integer = boardOpposing.Count
Dim totalWidth = totalMinions * 10
Dim minionX = minionNum * 10
Dim minionWidth As Double = 29 / 3
Dim totalWidth As Double = totalMinions * minionWidth
Dim minionX As Double = (minionNum * minionWidth) - (minionWidth / 2)

Dim minX = 50 - (totalWidth / 2) + minionX - 5 + XOffset
MoveTo(minX, 38)
Dim cursorX As Integer = 50 - (totalWidth / 2) + minionX + XOffset
MoveTo(cursorX, 38)
Return

End If

'Finally, check whether it is a hero
Expand Down

0 comments on commit f5e1dbb

Please sign in to comment.