Fix for trainer skins and pokégear trade buttons

This commit is contained in:
JappaWakka 2023-01-08 15:43:57 +01:00
parent 3ea6b65cac
commit f260ec0900
3 changed files with 73 additions and 19 deletions

View File

@ -88,8 +88,18 @@
Private Sub DrawIdle() Private Sub DrawIdle()
'Own Side: 'Own Side:
Core.SpriteBatch.Draw(Screen.Level.OwnPlayer.Texture, New Rectangle(100, 32, 64, 64), New Rectangle(0, 64, 32, 32), Color.White) Dim _ownTexture As Texture2D = Screen.Level.OwnPlayer.Texture
Core.SpriteBatch.DrawString(FontManager.MainFont, Core.Player.Name, New Vector2(170, 54), Color.White, 0.0F, Vector2.Zero, 1.25F, SpriteEffects.None, 0.0F) Dim _ownframeSize As Size
If _ownTexture.Width = _ownTexture.Height / 2 Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 2), CInt(_ownTexture.Height / 4))
ElseIf _ownTexture.Width = _ownTexture.Height Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 4), CInt(_ownTexture.Height / 4))
Else
_ownframeSize = New Size(CInt(_ownTexture.Width / 3), CInt(_ownTexture.Height / 4))
End If
_ownTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.Draw(_ownTexture, New Rectangle(100, 32, 64, 64), Color.White)
Canvas.DrawRectangle(New Rectangle(100, 100, 256, 256), New Color(255, 255, 255, 150)) Canvas.DrawRectangle(New Rectangle(100, 100, 256, 256), New Color(255, 255, 255, 150))
@ -156,8 +166,18 @@
Next Next
If Not t Is Nothing And Not tempPlayer Is Nothing Then If Not t Is Nothing And Not tempPlayer Is Nothing Then
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Core.windowSize.Width - 356), 32, 64, 64), New Rectangle(0, 64, 32, 32), Color.White) Dim _otherTexture As Texture2D = t
Core.SpriteBatch.DrawString(FontManager.MainFont, tempPlayer.Name, New Vector2(CInt(Core.windowSize.Width - 356) + 70, 54), Color.White, 0.0F, Vector2.Zero, 1.25F, SpriteEffects.None, 0.0F) Dim _otherframeSize As Size
If _otherTexture.Width = _otherTexture.Height / 2 Then
_otherframeSize = New Size(CInt(_otherTexture.Width / 2), CInt(_otherTexture.Height / 4))
ElseIf _otherTexture.Width = _otherTexture.Height Then
_otherframeSize = New Size(CInt(_otherTexture.Width / 4), CInt(_otherTexture.Height / 4))
Else
_otherframeSize = New Size(CInt(_otherTexture.Width / 3), CInt(_otherTexture.Height / 4))
End If
_otherTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.Draw(_otherTexture, New Rectangle(CInt(Core.windowSize.Width - 356), 32, 64, 64), Color.White)
End If End If
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 356), 100, 256, 256), New Color(255, 255, 255, 150)) Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 356), 100, 256, 256), New Color(255, 255, 255, 150))

View File

@ -151,8 +151,19 @@
Canvas.DrawRectangle(New Rectangle(100, 200, 300, 64), New Color(177, 228, 247, 200)) Canvas.DrawRectangle(New Rectangle(100, 200, 300, 64), New Color(177, 228, 247, 200))
Canvas.DrawGradient(New Rectangle(0, 200, 100, 64), New Color(255, 255, 255, 0), New Color(177, 228, 247, 200), True, -1) Canvas.DrawGradient(New Rectangle(0, 200, 100, 64), New Color(255, 255, 255, 0), New Color(177, 228, 247, 200), True, -1)
Core.SpriteBatch.DrawString(FontManager.MainFont, Core.Player.Name, New Vector2(140, 215), Color.Black, 0.0F, Vector2.Zero, 1.5F, SpriteEffects.None, 0.0F) Dim _ownTexture As Texture2D = Screen.Level.OwnPlayer.Texture
Core.SpriteBatch.Draw(Screen.Level.OwnPlayer.Texture, New Rectangle(60, 200, 64, 64), New Rectangle(0, 64, 32, 32), Color.White) Dim _ownframeSize As Size
If _ownTexture.Width = _ownTexture.Height / 2 Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 2), CInt(_ownTexture.Height / 4))
ElseIf _ownTexture.Width = _ownTexture.Height Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 4), CInt(_ownTexture.Height / 4))
Else
_ownframeSize = New Size(CInt(_ownTexture.Width / 3), CInt(_ownTexture.Height / 4))
End If
_ownTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.DrawString(FontManager.MainFont, Core.Player.Name, New Vector2(140, 215), Color.Black, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.Draw(_ownTexture, New Rectangle(60, 200, 64, 64), Color.White)
Canvas.DrawRectangle(New Rectangle(0, 264, 400, 32), New Color(6, 77, 139)) Canvas.DrawRectangle(New Rectangle(0, 264, 400, 32), New Color(6, 77, 139))
@ -218,8 +229,19 @@
Next Next
If Not t Is Nothing And Not tempPlayer Is Nothing Then If Not t Is Nothing And Not tempPlayer Is Nothing Then
Core.SpriteBatch.DrawString(FontManager.MainFont, tempPlayer.Name, New Vector2(Core.windowSize.Width - 260, 215), Color.Black, 0.0F, Vector2.Zero, 1.5F, SpriteEffects.None, 0.0F) Dim _otherTexture As Texture2D = t
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Core.windowSize.Width - 340), 200, 64, 64), New Rectangle(0, 64, 32, 32), Color.White) Dim _otherframeSize As Size
If _otherTexture.Width = _otherTexture.Height / 2 Then
_otherframeSize = New Size(CInt(_otherTexture.Width / 2), CInt(_otherTexture.Height / 4))
ElseIf _otherTexture.Width = _otherTexture.Height Then
_otherframeSize = New Size(CInt(_otherTexture.Width / 4), CInt(_otherTexture.Height / 4))
Else
_otherframeSize = New Size(CInt(_otherTexture.Width / 3), CInt(_otherTexture.Height / 4))
End If
_otherTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.DrawString(FontManager.MainFont, tempPlayer.Name, New Vector2(Core.windowSize.Width - 260, 215), Color.Black, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.Draw(_otherTexture, New Rectangle(CInt(Core.windowSize.Width - 340), 200, 64, 64), Color.White)
End If End If
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 400), 264, 400, 32), New Color(6, 77, 139)) Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 400), 264, 400, 32), New Color(6, 77, 139))
@ -720,8 +742,18 @@
Canvas.DrawRectangle(New Rectangle(100, 200, 300, 64), New Color(177, 228, 247, 200)) Canvas.DrawRectangle(New Rectangle(100, 200, 300, 64), New Color(177, 228, 247, 200))
Canvas.DrawGradient(New Rectangle(0, 200, 100, 64), New Color(255, 255, 255, 0), New Color(177, 228, 247, 200), True, -1) Canvas.DrawGradient(New Rectangle(0, 200, 100, 64), New Color(255, 255, 255, 0), New Color(177, 228, 247, 200), True, -1)
Core.SpriteBatch.DrawString(FontManager.MainFont, Core.Player.Name, New Vector2(140, 215), Color.Black, 0.0F, Vector2.Zero, 1.5F, SpriteEffects.None, 0.0F) Dim _ownTexture As Texture2D = Screen.Level.OwnPlayer.Texture
Core.SpriteBatch.Draw(Screen.Level.OwnPlayer.Texture, New Rectangle(60, 200, 64, 64), New Rectangle(0, 64, 32, 32), Color.White) Dim _ownframeSize As Size
If _ownTexture.Width = _ownTexture.Height / 2 Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 2), CInt(_ownTexture.Height / 4))
ElseIf _ownTexture.Width = _ownTexture.Height Then
_ownframeSize = New Size(CInt(_ownTexture.Width / 4), CInt(_ownTexture.Height / 4))
Else
_ownframeSize = New Size(CInt(_ownTexture.Width / 3), CInt(_ownTexture.Height / 4))
End If
_ownTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.Draw(_ownTexture, New Rectangle(60, 200, 64, 64), Color.White)
Canvas.DrawRectangle(New Rectangle(0, 264, 400, 32), New Color(6, 77, 139)) Canvas.DrawRectangle(New Rectangle(0, 264, 400, 32), New Color(6, 77, 139))
@ -795,16 +827,18 @@
Next Next
If Not t Is Nothing And Not tempPlayer Is Nothing Then If Not t Is Nothing And Not tempPlayer Is Nothing Then
Dim FrameSize As Vector2 Dim _otherTexture As Texture2D = t
If t.Width = t.Height / 2 Then Dim _otherframeSize As Size
FrameSize = New Vector2(CInt(t.Width / 2), CInt(t.Height / 4)) If _otherTexture.Width = _otherTexture.Height / 2 Then
ElseIf t.Width = t.Height Then _otherframeSize = New Size(CInt(_otherTexture.Width / 2), CInt(_otherTexture.Height / 4))
FrameSize = New Vector2(CInt(t.Width / 4), CInt(t.Height / 4)) ElseIf _otherTexture.Width = _otherTexture.Height Then
_otherframeSize = New Size(CInt(_otherTexture.Width / 4), CInt(_otherTexture.Height / 4))
Else Else
FrameSize = New Vector2(CInt(t.Width / 3), CInt(t.Height / 4)) _otherframeSize = New Size(CInt(_otherTexture.Width / 3), CInt(_otherTexture.Height / 4))
End If End If
Core.SpriteBatch.DrawString(FontManager.MainFont, tempPlayer.Name, New Vector2(Core.windowSize.Width - 260, 215), Color.Black, 0.0F, Vector2.Zero, 1.5F, SpriteEffects.None, 0.0F) _otherTexture = TextureManager.GetTexture(_ownTexture, New Rectangle(0, _ownframeSize.Height * 2, _ownframeSize.Width, _ownframeSize.Height))
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Core.windowSize.Width - 340), 200, 64, 64), New Rectangle(0, CInt(FrameSize.Y * 2), CInt(FrameSize.X), CInt(FrameSize.Y)), Color.White)
Core.SpriteBatch.Draw(_otherTexture, New Rectangle(CInt(Core.windowSize.Width - 340), 200, 64, 64), Color.White)
End If End If
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 400), 264, 400, 32), New Color(6, 77, 139)) Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 400), 264, 400, 32), New Color(6, 77, 139))

View File

@ -2070,7 +2070,7 @@
End If End If
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40), CInt(startPos.Y + 152 + i * 64), 16, 32), New Rectangle(96, 112, 8, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F) Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40), CInt(startPos.Y + 152 + i * 64), 16, 32), New Rectangle(96, 112, 8, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40 + 16), CInt(startPos.Y + 152 + i * 64), 128, 32), New Rectangle(102, 112, 4, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F) Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40 + 16), CInt(startPos.Y + 152 + i * 64), 192, 32), New Rectangle(102, 112, 4, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40 + 16 + 192), CInt(startPos.Y + 152 + i * 64), 16, 32), New Rectangle(104, 112, 8, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F) Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 40 + 16 + 192), CInt(startPos.Y + 152 + i * 64), 16, 32), New Rectangle(104, 112, 8, 16), Color.White, 0.0F, Vector2.Zero, eff, 0.0F)
Dim t As String = "Yes" Dim t As String = "Yes"