Misc fixes:
- Fixed some screen size related issues - Fixed crash related to indexes in TradeScreen - Fixed @Pokemon.AddToStorage command
This commit is contained in:
parent
35291e9834
commit
c89c4f8121
Binary file not shown.
|
@ -68,13 +68,14 @@
|
||||||
GraphicsDevice.PresentationParameters.BackBufferFormat = SurfaceFormat.Rgba1010102
|
GraphicsDevice.PresentationParameters.BackBufferFormat = SurfaceFormat.Rgba1010102
|
||||||
GraphicsDevice.PresentationParameters.DepthStencilFormat = DepthFormat.Depth24Stencil8
|
GraphicsDevice.PresentationParameters.DepthStencilFormat = DepthFormat.Depth24Stencil8
|
||||||
|
|
||||||
windowSize = New Rectangle(0, 0, CInt(GameOptions.WindowSize.X), CInt(GameOptions.WindowSize.Y))
|
|
||||||
|
|
||||||
GraphicsManager.PreferMultiSampling = True
|
GraphicsManager.PreferMultiSampling = True
|
||||||
GraphicsManager.GraphicsProfile = GraphicsProfile.HiDef
|
GraphicsManager.GraphicsProfile = GraphicsProfile.HiDef
|
||||||
|
|
||||||
GraphicsManager.ApplyChanges()
|
GraphicsManager.ApplyChanges()
|
||||||
|
|
||||||
|
windowSize = New Rectangle(0, 0, CInt(GameOptions.WindowSize.X), CInt(GameOptions.WindowSize.Y))
|
||||||
|
|
||||||
SpriteBatch = New CoreSpriteBatch(GraphicsDevice)
|
SpriteBatch = New CoreSpriteBatch(GraphicsDevice)
|
||||||
FontRenderer = New CoreSpriteBatch(GraphicsDevice)
|
FontRenderer = New CoreSpriteBatch(GraphicsDevice)
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,14 @@ Public Class GameController
|
||||||
|
|
||||||
Public Graphics As GraphicsDeviceManager
|
Public Graphics As GraphicsDeviceManager
|
||||||
Public FPSMonitor As FPSMonitor
|
Public FPSMonitor As FPSMonitor
|
||||||
|
|
||||||
|
Private window_change As Boolean = False
|
||||||
Public Shared UpdateChecked As Boolean = False
|
Public Shared UpdateChecked As Boolean = False
|
||||||
|
|
||||||
Private _componentManager As ComponentManager
|
Private _componentManager As ComponentManager
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
|
Me.window_change = False
|
||||||
Graphics = New GraphicsDeviceManager(Me)
|
Graphics = New GraphicsDeviceManager(Me)
|
||||||
Content.RootDirectory = "Content"
|
Content.RootDirectory = "Content"
|
||||||
|
|
||||||
|
@ -89,6 +92,10 @@ Public Class GameController
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Overrides Sub Update(ByVal gameTime As GameTime)
|
Protected Overrides Sub Update(ByVal gameTime As GameTime)
|
||||||
|
If Me.window_change Then
|
||||||
|
SetWindowSize(New Vector2(Window.ClientBounds.Width, Window.ClientBounds.Height))
|
||||||
|
Me.window_change = Not Me.window_change
|
||||||
|
End If
|
||||||
Core.Update(gameTime)
|
Core.Update(gameTime)
|
||||||
MyBase.Update(gameTime)
|
MyBase.Update(gameTime)
|
||||||
|
|
||||||
|
@ -121,8 +128,10 @@ Public Class GameController
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub Window_ClientSizeChanged(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub Window_ClientSizeChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
Me.window_change = True
|
||||||
Core.windowSize = New Rectangle(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height)
|
Core.windowSize = New Rectangle(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height)
|
||||||
|
|
||||||
|
|
||||||
If Not Core.CurrentScreen Is Nothing Then
|
If Not Core.CurrentScreen Is Nothing Then
|
||||||
Core.CurrentScreen.SizeChanged()
|
Core.CurrentScreen.SizeChanged()
|
||||||
Screen.TextBox.PositionY = Core.windowSize.Height - 160.0F
|
Screen.TextBox.PositionY = Core.windowSize.Height - 160.0F
|
||||||
|
|
|
@ -689,6 +689,10 @@ Public Class TradeScreen
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Me.BuyItemsList.Count > 0 Then
|
If Me.BuyItemsList.Count > 0 Then
|
||||||
|
|
||||||
|
While BuyItemsList.Count <= Scroll + Cursor
|
||||||
|
Cursor -= 1
|
||||||
|
End While
|
||||||
Dim selectedItem As TradeItem = Me.BuyItemsList(Scroll + Cursor)
|
Dim selectedItem As TradeItem = Me.BuyItemsList(Scroll + Cursor)
|
||||||
|
|
||||||
' Item preview:
|
' Item preview:
|
||||||
|
|
|
@ -702,9 +702,9 @@
|
||||||
' @Pokemon.AddToStorage([BoxIndex], PokemonData)
|
' @Pokemon.AddToStorage([BoxIndex], PokemonData)
|
||||||
' @Pokemon.AddToStorage(PokemonID, Level, [Method], [BallID], [Location], [isEgg], [trainerName])
|
' @Pokemon.AddToStorage(PokemonID, Level, [Method], [BallID], [Location], [isEgg], [trainerName])
|
||||||
|
|
||||||
If argument.StartsWith("{") = True Or argument.Remove(0, 1).StartsWith(",{") = True Then
|
If argument.StartsWith("{") = True Or argument.Remove(0, argument.IndexOf(",")).StartsWith(",{") = True Then
|
||||||
Dim insertIndex As Integer = Core.Player.Pokemons.Count
|
Dim insertIndex As Integer = Core.Player.Pokemons.Count
|
||||||
If argument.Remove(0, 1).StartsWith(",{") = True Then
|
If argument.Remove(0, argument.IndexOf(",")).StartsWith(",{") = True Then
|
||||||
insertIndex = int(argument.GetSplit(0))
|
insertIndex = int(argument.GetSplit(0))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue