Misc fixes:

- Fixed some screen size related issues
- Fixed crash related to indexes in TradeScreen
- Fixed @Pokemon.AddToStorage command
This commit is contained in:
CaptainSegis 2019-01-05 02:47:05 -05:00
parent 35291e9834
commit c89c4f8121
6 changed files with 17 additions and 3 deletions

View File

@ -68,13 +68,14 @@
GraphicsDevice.PresentationParameters.BackBufferFormat = SurfaceFormat.Rgba1010102
GraphicsDevice.PresentationParameters.DepthStencilFormat = DepthFormat.Depth24Stencil8
windowSize = New Rectangle(0, 0, CInt(GameOptions.WindowSize.X), CInt(GameOptions.WindowSize.Y))
GraphicsManager.PreferMultiSampling = True
GraphicsManager.GraphicsProfile = GraphicsProfile.HiDef
GraphicsManager.ApplyChanges()
windowSize = New Rectangle(0, 0, CInt(GameOptions.WindowSize.X), CInt(GameOptions.WindowSize.Y))
SpriteBatch = New CoreSpriteBatch(GraphicsDevice)
FontRenderer = New CoreSpriteBatch(GraphicsDevice)

View File

@ -50,11 +50,14 @@ Public Class GameController
Public Graphics As GraphicsDeviceManager
Public FPSMonitor As FPSMonitor
Private window_change As Boolean = False
Public Shared UpdateChecked As Boolean = False
Private _componentManager As ComponentManager
Public Sub New()
Me.window_change = False
Graphics = New GraphicsDeviceManager(Me)
Content.RootDirectory = "Content"
@ -89,6 +92,10 @@ Public Class GameController
End Sub
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)
MyBase.Update(gameTime)
@ -121,8 +128,10 @@ Public Class GameController
End Sub
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)
If Not Core.CurrentScreen Is Nothing Then
Core.CurrentScreen.SizeChanged()
Screen.TextBox.PositionY = Core.windowSize.Height - 160.0F

View File

@ -689,6 +689,10 @@ Public Class TradeScreen
Next
If Me.BuyItemsList.Count > 0 Then
While BuyItemsList.Count <= Scroll + Cursor
Cursor -= 1
End While
Dim selectedItem As TradeItem = Me.BuyItemsList(Scroll + Cursor)
' Item preview:

View File

@ -702,9 +702,9 @@
' @Pokemon.AddToStorage([BoxIndex], PokemonData)
' @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
If argument.Remove(0, 1).StartsWith(",{") = True Then
If argument.Remove(0, argument.IndexOf(",")).StartsWith(",{") = True Then
insertIndex = int(argument.GetSplit(0))
End If

Binary file not shown.