diff --git a/P3D/Battle/BattleSystemV2/BattleMenu.vb b/P3D/Battle/BattleSystemV2/BattleMenu.vb index b48bcdf68..40f5584c2 100644 --- a/P3D/Battle/BattleSystemV2/BattleMenu.vb +++ b/P3D/Battle/BattleSystemV2/BattleMenu.vb @@ -7,11 +7,18 @@ Moves End Enum + Public CanInteract As Boolean = True Public MenuState As MenuStates = MenuStates.Main Public Visible As Boolean = False Public Sub New() Me.Reset() + Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen} + If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True Then + CanInteract = False + Else + CanInteract = True + End If End Sub Public Sub Reset() @@ -193,9 +200,9 @@ End If Dim cX As Integer = 0 - If HPpercentage <= 50.0F And HPpercentage > 15.0F Then + If HPpercentage <= 75.0F And HPpercentage > 25.0F Then cX = 2 - ElseIf HPpercentage <= 15.0F Then + ElseIf HPpercentage <= 25.0F Then cX = 4 End If @@ -307,12 +314,14 @@ End Sub Public Sub Update(ByRef BattleScreen As BattleScreen) - Select Case MenuState - Case MenuStates.Main - UpdateMainMenu(BattleScreen) - Case MenuStates.Moves - UpdateMoveMenu(BattleScreen) - End Select + If CanInteract = True Then + Select Case MenuState + Case MenuStates.Main + UpdateMainMenu(BattleScreen) + Case MenuStates.Moves + UpdateMoveMenu(BattleScreen) + End Select + End If End Sub Private _allItemsExtended As Integer = 0 diff --git a/P3D/Battle/BattleSystemV2/BattleScreen.vb b/P3D/Battle/BattleSystemV2/BattleScreen.vb index 5274ece0b..dd78391fd 100644 --- a/P3D/Battle/BattleSystemV2/BattleScreen.vb +++ b/P3D/Battle/BattleSystemV2/BattleScreen.vb @@ -1025,11 +1025,13 @@ nextIndexForeground: End If Lighting.UpdateLighting(Screen.Effect) - Camera.Update() - Level.Update() + If IsCurrentScreen() = True Then + Camera.Update() - SkyDome.Update() + Level.Update() + SkyDome.Update() + End If TextBox.Update() If TextBox.Showing = False Then Dim cIndex As Integer = 0 diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb index 02b6551be..d10d0b1ae 100644 --- a/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb +++ b/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb @@ -58,9 +58,11 @@ Me._textIndex = Me._text.Length End If Else - If Controls.Accept(True, True) = True Then - SoundManager.PlaySound("select") - Me._ready = True + If CurrentScreen.Identification <> Screen.Identifications.PauseScreen AndAlso CurrentScreen.Identification <> Screen.Identifications.ChatScreen Then + If Controls.Accept(True, True) = True Then + SoundManager.PlaySound("select") + Me._ready = True + End If End If End If End Sub diff --git a/P3D/Network/ChatScreen.vb b/P3D/Network/ChatScreen.vb index bbe3c9e54..888eb606a 100644 --- a/P3D/Network/ChatScreen.vb +++ b/P3D/Network/ChatScreen.vb @@ -61,9 +61,11 @@ Public Class ChatScreen 'Updates the level screen so online player entities get drawn. If PreScreen.Identification = Identifications.OverworldScreen And JoinServerScreen.Online = True Then Screen.Level.Update() - End If - If PreScreen.Identification = Screen.Identifications.BattleScreen Then + ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then PreScreen.Update() + ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then + PreScreen.Update() + CType(PreScreen, BattleCatchScreen).UpdateAnimations() End If If CursorDelay > 0 Then diff --git a/P3D/Screens/Inventory/NewInventoryScreen.vb b/P3D/Screens/Inventory/NewInventoryScreen.vb index ff5311e0a..921e57a89 100644 --- a/P3D/Screens/Inventory/NewInventoryScreen.vb +++ b/P3D/Screens/Inventory/NewInventoryScreen.vb @@ -587,6 +587,9 @@ Public Class NewInventoryScreen End Function Public Overrides Sub Update() + If PreScreen.Identification = Screen.Identifications.BattleScreen Then + PreScreen.Update() + End If 'Updates the tab highlight: For index = 0 To _tabHighlight.Length - 1 If index <> _tabIndex Then diff --git a/P3D/Screens/MainMenu/PauseScreen.vb b/P3D/Screens/MainMenu/PauseScreen.vb index 93a7cd34b..241d6e1bc 100644 --- a/P3D/Screens/MainMenu/PauseScreen.vb +++ b/P3D/Screens/MainMenu/PauseScreen.vb @@ -82,7 +82,10 @@ If PreScreen.Identification = Identifications.OverworldScreen Then Screen.Level.Update() ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then + PreScreen.Update() CType(PreScreen, BattleCatchScreen).UpdateAnimations() + ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then + PreScreen.Update() End If Screen.TextBox.reDelay = 0.0F diff --git a/P3D/Screens/Pokemon/PartyScreen.vb b/P3D/Screens/Pokemon/PartyScreen.vb index f45dfe4f3..2e57a30b7 100644 --- a/P3D/Screens/Pokemon/PartyScreen.vb +++ b/P3D/Screens/Pokemon/PartyScreen.vb @@ -420,6 +420,9 @@ Public Class PartyScreen End Function Public Overrides Sub Update() + If PreScreen.Identification = Screen.Identifications.BattleScreen Then + PreScreen.Update() + End If If _pokemonAnimations.Count > 0 Then Dim animation As PokemonAnimation = _pokemonAnimations(_index) If animation._shakeLeft Then diff --git a/P3D/Screens/Pokemon/SummaryScreen.vb b/P3D/Screens/Pokemon/SummaryScreen.vb index 8e9ed9680..3a4e9d418 100644 --- a/P3D/Screens/Pokemon/SummaryScreen.vb +++ b/P3D/Screens/Pokemon/SummaryScreen.vb @@ -593,6 +593,9 @@ End Sub Public Overrides Sub Update() + If PreScreen.PreScreen.Identification = Screen.Identifications.BattleScreen Then + PreScreen.PreScreen.Update() + End If If _closing = True Then If _fadeIn > 0F Then _fadeIn = MathHelper.Lerp(0, _fadeIn, 0.8F)