Fixed some visual bugs related to pvp and trading

and replaced some fonts
This commit is contained in:
JappaWakka 2023-01-23 12:12:08 +01:00
parent 4f2513dac9
commit d3bde7eef0
3 changed files with 18 additions and 16 deletions

View File

@ -100,6 +100,7 @@
_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)
Core.SpriteBatch.DrawString(FontManager.MainFont, Core.Player.Name, New Vector2(170, 54), Color.White, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
Canvas.DrawRectangle(New Rectangle(100, 100, 256, 256), New Color(255, 255, 255, 150))
@ -114,17 +115,17 @@
itemString = OfferPokemon.Item.Name
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, OfferPokemon.GetDisplayName() & Environment.NewLine & "Level: " & OfferPokemon.Level & Environment.NewLine & "OT: " & OfferPokemon.OT & " / " & OfferPokemon.CatchTrainerName & Environment.NewLine & "Item: " & itemString, New Vector2(114, 414), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, OfferPokemon.GetDisplayName() & Environment.NewLine & "Level: " & OfferPokemon.Level & Environment.NewLine & "OT: " & OfferPokemon.OT & " / " & OfferPokemon.CatchTrainerName & Environment.NewLine & "Item: " & itemString, New Vector2(114, 414), Color.Black)
End If
'Menu:
If ReceivedTradeOffer = True Then
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2), 100, 64 * 4, 64), New Color(255, 255, 255, 150))
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Your trade partner" & Environment.NewLine & "accepts this trade.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, "Your trade partner" & Environment.NewLine & "accepts this trade.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Else
If SentTradeOffer = True Then
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2), 100, 64 * 4, 64), New Color(255, 255, 255, 150))
Core.SpriteBatch.DrawString(FontManager.MiniFont, "You accepted" & Environment.NewLine & "this trade.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, "You accepted" & Environment.NewLine & "this trade.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
End If
End If
@ -133,7 +134,7 @@
Core.SpriteBatch.Draw(Me.texture, New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 64, 200 + i * 96, 64 * 2, 64), New Rectangle(32, 16, 16, 16), Color.White)
Core.SpriteBatch.Draw(Me.texture, New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 64 * 3, 200 + i * 96, 64, 64), New Rectangle(16, 16, 16, 16), Color.White, 0.0F, Vector2.Zero, SpriteEffects.FlipHorizontally, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.menuItems(i), New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 20, 216 + i * 96), Color.Black, 0.0F, Vector2.Zero, 1.25F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.menuItems(i), New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 20, 216 + i * 96), Color.Black, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
Next
DrawCursor()
@ -175,9 +176,10 @@
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))
_otherTexture = TextureManager.GetTexture(_otherTexture, New Rectangle(0, _otherframeSize.Height * 2, _otherframeSize.Width, _otherframeSize.Height))
Core.SpriteBatch.Draw(_otherTexture, New Rectangle(CInt(Core.windowSize.Width - 356), 32, 64, 64), Color.White)
Core.SpriteBatch.DrawString(FontManager.MainFont, tempPlayer.Name, New Vector2(CInt(Core.windowSize.Width - 356) + 70, 54), Color.White, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
End If
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width - 356), 100, 256, 256), New Color(255, 255, 255, 150))
@ -193,7 +195,7 @@
itemString = TradePokemon.Item.Name
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, TradePokemon.GetDisplayName() & Environment.NewLine & "Level: " & TradePokemon.Level & Environment.NewLine & "OT: " & TradePokemon.OT & " / " & TradePokemon.CatchTrainerName & Environment.NewLine & "Item: " & itemString, New Vector2(CInt(Core.windowSize.Width - 356) + 14, 414), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, TradePokemon.GetDisplayName() & Environment.NewLine & "Level: " & TradePokemon.Level & Environment.NewLine & "OT: " & TradePokemon.OT & " / " & TradePokemon.CatchTrainerName & Environment.NewLine & "Item: " & itemString, New Vector2(CInt(Core.windowSize.Width - 356) + 14, 414), Color.Black)
End If
End Sub

View File

@ -173,7 +173,7 @@
Dim p As Pokemon = OwnTeam(i)
Dim pokeTexture = p.GetMenuTexture()
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width), CSng(32 / pokeTexture.Height))
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(40 + i * 40 - CInt((pokeTexture.Width - 32) / 2), 264, CInt(pokeTexture.Width * pokeTextureScale.X), CInt(pokeTexture.Height * pokeTextureScale.Y)), Color.White)
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(40 + i * 40 - CInt((pokeTexture.Width * pokeTextureScale.X - 32) / 2), 264, CInt(pokeTexture.Width * pokeTextureScale.X), CInt(pokeTexture.Height * pokeTextureScale.Y)), Color.White)
Next
End If
End If
@ -181,11 +181,11 @@
'Menu:
If ReceivedBattleOffer = True Then
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2), 100, 64 * 4, 64), New Color(255, 255, 255, 150))
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Your opponent wants to" & Environment.NewLine & "battle with this setup.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, "Your opponent wants to" & Environment.NewLine & "battle with this setup.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Else
If SentBattleOffer = True Then
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2), 100, 64 * 4, 64), New Color(255, 255, 255, 150))
Core.SpriteBatch.DrawString(FontManager.MiniFont, "You want to battle" & Environment.NewLine & "with this setup.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, "You want to battle" & Environment.NewLine & "with this setup.", New Vector2(CInt(Core.windowSize.Width / 2 - (64 * 4) / 2) + 4, 104), Color.Black)
End If
End If
@ -238,7 +238,7 @@
Else
_otherframeSize = New Size(CInt(_otherTexture.Width / 3), CInt(_otherTexture.Height / 4))
End If
_otherTexture = TextureManager.GetTexture(_otherTexture, New Rectangle(0, _otherTexture.Height * 2, _otherTexture.Width, _otherTexture.Height))
_otherTexture = TextureManager.GetTexture(_otherTexture, New Rectangle(0, _otherframeSize.Height * 2, _otherframeSize.Width, _otherframeSize.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)
@ -787,8 +787,8 @@
.NoEffect & Environment.NewLine & Environment.NewLine &
.Critical
Core.SpriteBatch.DrawString(FontManager.MiniFont, s1, New Vector2(40, 340), Color.White, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MiniFont, s2, New Vector2(250, 340), Color.LightBlue, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, s1, New Vector2(40, 340), Color.White, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, s2, New Vector2(250, 340), Color.LightBlue, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
End With
'Draw Pokémon left:
@ -837,7 +837,7 @@
Else
_otherframeSize = New Size(CInt(_otherTexture.Width / 3), CInt(_otherTexture.Height / 4))
End If
_otherTexture = TextureManager.GetTexture(_otherTexture, New Rectangle(0, _otherTexture.Height * 2, _otherTexture.Width, _otherTexture.Height))
_otherTexture = TextureManager.GetTexture(_otherTexture, New Rectangle(0, _otherframeSize.Height * 2, _otherframeSize.Width, _otherframeSize.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)
@ -874,8 +874,8 @@
.NoEffect & Environment.NewLine & Environment.NewLine &
.Critical
Core.SpriteBatch.DrawString(FontManager.MiniFont, s1, New Vector2(Core.windowSize.Width - 360, 340), Color.White, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MiniFont, s2, New Vector2(Core.windowSize.Width - 150, 340), Color.LightBlue, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, s1, New Vector2(Core.windowSize.Width - 360, 340), Color.White, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
Core.SpriteBatch.DrawString(FontManager.MainFont, s2, New Vector2(Core.windowSize.Width - 150, 340), Color.LightBlue, 0.0F, Vector2.Zero, 1.1F, SpriteEffects.None, 0.0F)
End With
End If

View File

@ -2219,7 +2219,7 @@
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 + 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)
Dim t As String = "Yes"