mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 16:24:45 +02:00
Last move index is remembered in battle menu
This commit is contained in:
parent
ef770de841
commit
940059013c
@ -342,6 +342,7 @@
|
|||||||
|
|
||||||
Private _moveMenuIndex As Integer = 0
|
Private _moveMenuIndex As Integer = 0
|
||||||
Private _moveMenuNextIndex As Integer = 0
|
Private _moveMenuNextIndex As Integer = 0
|
||||||
|
Private _moveMenuLastIndex As Integer = 0
|
||||||
Private _moveMenuItemList As New List(Of MoveMenuItem)
|
Private _moveMenuItemList As New List(Of MoveMenuItem)
|
||||||
Private _moveMenuCreatedID As String = ""
|
Private _moveMenuCreatedID As String = ""
|
||||||
Private _moveMenuAlpha As Integer = 255
|
Private _moveMenuAlpha As Integer = 255
|
||||||
@ -527,6 +528,7 @@
|
|||||||
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -535,10 +537,12 @@
|
|||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
Me.ClickAction(BattleScreen)
|
Me.ClickAction(BattleScreen)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
|
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
|
||||||
|
BattleScreen.BattleMenu._moveMenuLastIndex = Me.Index
|
||||||
BattleScreen.BattleMenu._isRetracting = True
|
BattleScreen.BattleMenu._isRetracting = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -777,7 +781,10 @@
|
|||||||
_retractMenu = True
|
_retractMenu = True
|
||||||
_nextMenuState = MenuStates.Moves
|
_nextMenuState = MenuStates.Moves
|
||||||
PartyScreen.Selected = -1
|
PartyScreen.Selected = -1
|
||||||
|
If _moveMenuIndex <> _moveMenuLastIndex Then
|
||||||
|
_moveMenuNextIndex = _moveMenuLastIndex
|
||||||
|
_moveMenuIndex = _moveMenuLastIndex
|
||||||
|
End If
|
||||||
BattleScreen.BattleQuery.Clear()
|
BattleScreen.BattleQuery.Clear()
|
||||||
Dim q As New CameraQueryObject(New Vector3(11, 0.5F, 14.0F), New Vector3(11, 0.5F, 14.0F), Screen.Camera.Speed, Screen.Camera.Speed, -(CSng(MathHelper.PiOver4) + 0.3F), -(CSng(MathHelper.PiOver4) + 0.3F), -0.3F, -0.3F, 0.04F, 0.04F)
|
Dim q As New CameraQueryObject(New Vector3(11, 0.5F, 14.0F), New Vector3(11, 0.5F, 14.0F), Screen.Camera.Speed, Screen.Camera.Speed, -(CSng(MathHelper.PiOver4) + 0.3F), -(CSng(MathHelper.PiOver4) + 0.3F), -0.3F, -0.3F, 0.04F, 0.04F)
|
||||||
BattleScreen.BattleQuery.AddRange({q})
|
BattleScreen.BattleQuery.AddRange({q})
|
||||||
@ -971,11 +978,21 @@
|
|||||||
Else
|
Else
|
||||||
UseStruggle(BattleScreen)
|
UseStruggle(BattleScreen)
|
||||||
|
|
||||||
If _moveMenuItemList.Count = 0 Or _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Or BattleScreen.IsChoiced Then
|
If _moveMenuItemList.Count = 0 Or _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
||||||
If _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
If _moveMenuCreatedID <> BattleScreen.OwnPokemon.IndividualValue Then
|
||||||
_moveMenuIndex = 0
|
_moveMenuIndex = 0
|
||||||
End If
|
End If
|
||||||
CreateMoveMenuItems(BattleScreen)
|
CreateMoveMenuItems(BattleScreen)
|
||||||
|
If _moveMenuIndex <> _moveMenuLastIndex Then
|
||||||
|
_moveMenuNextIndex = _moveMenuLastIndex
|
||||||
|
_moveMenuIndex = _moveMenuLastIndex
|
||||||
|
|
||||||
|
If _moveMenuIndex > _moveMenuItemList.Count - 1 Then
|
||||||
|
_moveMenuNextIndex = 0
|
||||||
|
_moveMenuIndex = 0
|
||||||
|
_moveMenuLastIndex = 0
|
||||||
|
End If
|
||||||
|
End If
|
||||||
_moveMenuCreatedID = BattleScreen.OwnPokemon.IndividualValue
|
_moveMenuCreatedID = BattleScreen.OwnPokemon.IndividualValue
|
||||||
End If
|
End If
|
||||||
If _retractMenu = False Then
|
If _retractMenu = False Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user