From d21f97c7b505365b5a330fb8d22488d0618a2645 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Tue, 9 Aug 2022 20:13:03 +0200 Subject: [PATCH] Various visual fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed Pokémon icon size in various screens Aligned the partially transparent black shape of the JoinServerScreen better --- P3D/Network/GameJolt/RegisterBattleScreen.vb | 6 +++--- P3D/Network/Servers/PVPLobbyScreen.vb | 4 ++-- P3D/Screens/MainMenu/JoinServerScreen.vb | 2 +- P3D/Screens/Pokedex/PokedexScreen.vb | 5 +++-- P3D/Screens/Pokemon/SummaryScreen.vb | 3 ++- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/P3D/Network/GameJolt/RegisterBattleScreen.vb b/P3D/Network/GameJolt/RegisterBattleScreen.vb index 42e5f555c..2bf605b0d 100644 --- a/P3D/Network/GameJolt/RegisterBattleScreen.vb +++ b/P3D/Network/GameJolt/RegisterBattleScreen.vb @@ -233,7 +233,7 @@ For i = 0 To Me.OwnTeam.Count - 1 Dim p As Pokemon = Me.OwnTeam(i) Dim pokeTexture = p.GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + 200 + i * 68 - CInt(pokeTexture.Width - 32), CInt(startPos.Y) - 26, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + 200 + i * 68 - CInt(pokeTexture.Width - 32), CInt(startPos.Y) - 26, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) Next Else Core.SpriteBatch.DrawString(FontManager.MainFont, "No Team registered.", New Vector2(CInt(Core.windowSize.Width / 2 - FontManager.MainFont.MeasureString(t).X / 2), 335 - FontManager.MainFont.MeasureString(t).Y / 2), Color.Black) @@ -390,7 +390,7 @@ If BattleBoxPokemon.Count - 1 >= i Then Dim pokeTexture = BattleBoxPokemon(i).GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) End If Core.SpriteBatch.DrawString(FontManager.MainFont, "Battle Box", New Vector2(CInt(startPos.X) + 80, CInt(startPos.Y) - 45), Color.White) @@ -411,7 +411,7 @@ If Core.Player.Pokemons.Count - 1 >= i Then Dim pokeTexture = Core.Player.Pokemons(i).GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) End If Core.SpriteBatch.DrawString(FontManager.MainFont, "Team", New Vector2(CInt(startPos.X) + 106, CInt(startPos.Y) - 45), Color.White) diff --git a/P3D/Network/Servers/PVPLobbyScreen.vb b/P3D/Network/Servers/PVPLobbyScreen.vb index 33f4fd85e..19c5e492d 100644 --- a/P3D/Network/Servers/PVPLobbyScreen.vb +++ b/P3D/Network/Servers/PVPLobbyScreen.vb @@ -361,7 +361,7 @@ If BattleBoxPokemon.Count - 1 >= i Then Dim pokeTexture = BattleBoxPokemon(i).GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) End If Core.SpriteBatch.DrawString(FontManager.MainFont, "Battle Box", New Vector2(CInt(startPos.X) + 80, CInt(startPos.Y) - 45), Color.White) @@ -382,7 +382,7 @@ If Core.Player.Pokemons.Count - 1 >= i Then Dim pokeTexture = Core.Player.Pokemons(i).GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(startPos.X) + x * 140 + 32 - CInt(pokeTexture.Width - 32), y * 100 + CInt(startPos.Y) + 10, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) End If Core.SpriteBatch.DrawString(FontManager.MainFont, "Team", New Vector2(CInt(startPos.X) + 106, CInt(startPos.Y) - 45), Color.White) diff --git a/P3D/Screens/MainMenu/JoinServerScreen.vb b/P3D/Screens/MainMenu/JoinServerScreen.vb index fda76c150..2e758e8ca 100644 --- a/P3D/Screens/MainMenu/JoinServerScreen.vb +++ b/P3D/Screens/MainMenu/JoinServerScreen.vb @@ -86,7 +86,7 @@ Public Class JoinServerScreen Next Next - Canvas.DrawRectangle(New Rectangle(0, 75, Core.ScreenSize.Width, Core.ScreenSize.Height - 240), New Color(0, 0, 0, 128), True) + Canvas.DrawRectangle(New Rectangle(0, 72, Core.ScreenSize.Width, Core.ScreenSize.Height - 240), New Color(0, 0, 0, 128), True) Core.SpriteBatch.DrawInterfaceString(FontManager.MainFont, "Join a server:", New Vector2(CInt(Core.ScreenSize.Width / 2 - FontManager.MainFont.MeasureString("Join A Server").X) + 4, 14 + 4), Color.Black, 0.0F, New Vector2(0), 2.0F, SpriteEffects.None, 0.0F) Core.SpriteBatch.DrawInterfaceString(FontManager.MainFont, "Join a server:", New Vector2(CInt(Core.ScreenSize.Width / 2 - FontManager.MainFont.MeasureString("Join A Server").X), 14), Color.White, 0.0F, New Vector2(0), 2.0F, SpriteEffects.None, 0.0F) diff --git a/P3D/Screens/Pokedex/PokedexScreen.vb b/P3D/Screens/Pokedex/PokedexScreen.vb index 576d2c2e5..7372feffe 100644 --- a/P3D/Screens/Pokedex/PokedexScreen.vb +++ b/P3D/Screens/Pokedex/PokedexScreen.vb @@ -551,7 +551,8 @@ Public Class PokedexScreen c = Color.White End If Dim pokeTexture = p.GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(50 + x * 100, 140 + y * 100, pokeTexture.Width * 2, 64), c) + Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2)) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(50 + x * 100, 140 + y * 100, CInt(pokeTexture.Width * pokeTextureScale.X), CInt(pokeTexture.Height * pokeTextureScale.Y)), c) End If Dim no As String = "000" @@ -1413,7 +1414,7 @@ Public Class PokedexViewScreen Core.SpriteBatch.Draw(Me.texture, New Rectangle(20 + 64 * 6, 20, 64, 64), New Rectangle(16, 16, 16, 16), Color.White, 0.0F, Vector2.Zero, SpriteEffects.FlipHorizontally, 0.0F) Dim pokeTexture = Pokemon.GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(28, 20, pokeTexture.Width * 2, 64), Color.White) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(28, 20, pokeTexture.Width * 2, pokeTexture.Height * 2), Color.White) Core.SpriteBatch.DrawString(FontManager.MainFont, Pokemon.GetName(), New Vector2(100, 36), Color.Black, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F) If EntryType = 1 Then diff --git a/P3D/Screens/Pokemon/SummaryScreen.vb b/P3D/Screens/Pokemon/SummaryScreen.vb index be128b998..808742f77 100644 --- a/P3D/Screens/Pokemon/SummaryScreen.vb +++ b/P3D/Screens/Pokemon/SummaryScreen.vb @@ -153,7 +153,8 @@ For i = 0 To _party.Count - 1 Dim pokemonPos As Double = GetPokemonDest(i) - 16 - (64 + 16) * (_pokemonDest - _pokemonPos) Dim pokeTexture = _party(i).GetMenuTexture() - Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(pokemonPos) - CInt(pokeTexture.Width / 2), DeltaY - 80, pokeTexture.Width * 2, pokeTexture.Height * 2), mainBackgroundColor) + Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2)) + Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(pokemonPos), CInt(DeltaY - 32 - pokeTexture.Height * pokeTextureScale.Y), CInt(pokeTexture.Width * pokeTextureScale.X), CInt(pokeTexture.Height * pokeTextureScale.Y)), mainBackgroundColor) Next SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\PokemonInfo"), New Rectangle(CInt(_pointerPos), DeltaY - 16, 32, 16), New Rectangle(0, 16, 32, 16), mainBackgroundColor)