Fixed some visual issues in NewInventoryScreen and PartyScreen related to GaussianBlur effect. Removed obsolete ItemDetailScreen.
This commit is contained in:
parent
23b7edf440
commit
b859e5e79f
|
@ -1674,7 +1674,6 @@
|
|||
<Compile Include="Screens\GUI\ISelectionScreen.vb" />
|
||||
<Compile Include="Screens\HistoryScreen.vb" />
|
||||
<Compile Include="Screens\Inventory\ApricornScreen.vb" />
|
||||
<Compile Include="Screens\Inventory\ItemDetailScreen.vb" />
|
||||
<Compile Include="Screens\Inventory\NewInventoryScreen.vb" />
|
||||
<Compile Include="Screens\Inventory\PokegearScreen.vb" />
|
||||
<Compile Include="Screens\MainMenu\AddServerScreen.vb" />
|
||||
|
|
|
@ -37,6 +37,13 @@ Public Class NewInventoryScreen
|
|||
Private _tossingItems As Boolean = False
|
||||
Private _tossValue As Integer = 1
|
||||
|
||||
'Stuff related to blurred PreScreens
|
||||
Private _preScreenTexture As RenderTarget2D
|
||||
Private _preScreenTarget As RenderTarget2D
|
||||
Private _blurScreens As Identifications() = {Identifications.BattleScreen,
|
||||
Identifications.OverworldScreen,
|
||||
Identifications.MailSystemScreen}
|
||||
|
||||
''' <summary>
|
||||
''' The item index of the current tab and page:
|
||||
''' </summary>
|
||||
|
@ -126,6 +133,9 @@ Public Class NewInventoryScreen
|
|||
|
||||
Public Sub New(ByVal currentScreen As Screen, ByVal AllowedPages As Integer(), ByVal StartPageIndex As Integer, ByVal DoStuff As DoStuff)
|
||||
|
||||
_preScreenTarget = New RenderTarget2D(GraphicsDevice, windowSize.Width, windowSize.Height)
|
||||
_blur = New Resources.GaussianEffect(windowSize.Width, windowSize.Height)
|
||||
|
||||
_tabIndex = StartPageIndex
|
||||
Me.AllowedPages = AllowedPages
|
||||
ReturnItem = DoStuff
|
||||
|
@ -181,8 +191,11 @@ Public Class NewInventoryScreen
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
PreScreen.Draw()
|
||||
|
||||
If _blurScreens.Contains(PreScreen.Identification) Then
|
||||
DrawPrescreen()
|
||||
Else
|
||||
PreScreen.Draw()
|
||||
End If
|
||||
DrawGradients(CInt(255 * _interfaceFade))
|
||||
|
||||
DrawTabs()
|
||||
|
@ -197,6 +210,32 @@ Public Class NewInventoryScreen
|
|||
DrawAmount()
|
||||
End Sub
|
||||
|
||||
Private _blur As Resources.GaussianEffect
|
||||
|
||||
Private Sub DrawPrescreen()
|
||||
If _preScreenTexture Is Nothing OrElse _preScreenTexture.IsContentLost Then
|
||||
SpriteBatch.EndBatch()
|
||||
|
||||
Dim target As RenderTarget2D = _preScreenTarget
|
||||
GraphicsDevice.SetRenderTarget(target)
|
||||
GraphicsDevice.Clear(BackgroundColor)
|
||||
|
||||
SpriteBatch.BeginBatch()
|
||||
|
||||
PreScreen.Draw()
|
||||
|
||||
SpriteBatch.EndBatch()
|
||||
|
||||
GraphicsDevice.SetRenderTarget(Nothing)
|
||||
|
||||
SpriteBatch.BeginBatch()
|
||||
|
||||
_preScreenTexture = target
|
||||
End If
|
||||
|
||||
SpriteBatch.Draw(_blur.Perform(_preScreenTexture), windowSize, Color.White)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Draws the temporary message.
|
||||
''' </summary>
|
||||
|
|
|
@ -74,7 +74,22 @@ Public Class PartyScreen
|
|||
Public LearnType As Integer = 0
|
||||
Dim moveLearnArg As Object = Nothing
|
||||
|
||||
'Stuff related to blurred PreScreens
|
||||
Private _preScreenTexture As RenderTarget2D
|
||||
Private _preScreenTarget As RenderTarget2D
|
||||
Private _blurScreens As Identifications() = {Identifications.BattleScreen,
|
||||
Identifications.OverworldScreen,
|
||||
Identifications.DirectTradeScreen,
|
||||
Identifications.WonderTradeScreen,
|
||||
Identifications.GTSSetupScreen,
|
||||
Identifications.GTSTradeScreen,
|
||||
Identifications.PVPLobbyScreen}
|
||||
|
||||
Public Sub New(ByVal currentScreen As Screen, ByVal Item As Item, ByVal ChoosePokemon As DoStuff, ByVal Title As String, ByVal canExit As Boolean, ByVal canChooseFainted As Boolean, ByVal canChooseEgg As Boolean, Optional ByVal _pokemonList As List(Of Pokemon) = Nothing, Optional ByVal ChooseMode As Boolean = True)
|
||||
|
||||
_preScreenTarget = New RenderTarget2D(GraphicsDevice, windowSize.Width, windowSize.Height)
|
||||
_blur = New Resources.GaussianEffect(windowSize.Width, windowSize.Height)
|
||||
|
||||
Me.Item = Item
|
||||
Me.POKEMON_TITLE = Title
|
||||
Me.CanExit = canExit
|
||||
|
@ -146,7 +161,11 @@ Public Class PartyScreen
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
PreScreen.Draw()
|
||||
If _blurScreens.Contains(PreScreen.Identification) Then
|
||||
DrawPrescreen()
|
||||
Else
|
||||
PreScreen.Draw()
|
||||
End If
|
||||
|
||||
DrawGradients(CInt(255 * _interfaceFade))
|
||||
|
||||
|
@ -168,6 +187,34 @@ Public Class PartyScreen
|
|||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private _blur As Resources.GaussianEffect
|
||||
|
||||
Private Sub DrawPrescreen()
|
||||
If _preScreenTexture Is Nothing OrElse _preScreenTexture.IsContentLost Then
|
||||
SpriteBatch.EndBatch()
|
||||
|
||||
Dim target As RenderTarget2D = _preScreenTarget
|
||||
GraphicsDevice.SetRenderTarget(target)
|
||||
GraphicsDevice.Clear(BackgroundColor)
|
||||
|
||||
SpriteBatch.BeginBatch()
|
||||
|
||||
PreScreen.Draw()
|
||||
|
||||
SpriteBatch.EndBatch()
|
||||
|
||||
GraphicsDevice.SetRenderTarget(Nothing)
|
||||
|
||||
SpriteBatch.BeginBatch()
|
||||
|
||||
_preScreenTexture = target
|
||||
End If
|
||||
|
||||
SpriteBatch.Draw(_blur.Perform(_preScreenTexture), windowSize, Color.White)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DrawBackground()
|
||||
Dim mainBackgroundColor As Color = Color.White
|
||||
If _closing And _messageDelay = 0 Then
|
||||
|
|
Loading…
Reference in New Issue