Fixed missing characters in fonts, aligned text
When renaming a pokémon, the input box and the header text messages were off-center so I fixed that Added some missing characters to the fonts, including the male and female symbols
@ -104,24 +104,16 @@ Public Class NameObjectScreen
|
|||||||
|
|
||||||
If _askedRename = False Then
|
If _askedRename = False Then
|
||||||
Dim genderString As String = ""
|
Dim genderString As String = ""
|
||||||
Dim genderUnicode As Integer = 0
|
|
||||||
If _renamePokemon = True Then
|
If _renamePokemon = True Then
|
||||||
If _pokemon.Gender = Pokemon.Genders.Male Then
|
If _pokemon.Gender = Pokemon.Genders.Male Then
|
||||||
genderString = " "
|
genderString = " ♂"
|
||||||
genderUnicode = 156
|
|
||||||
ElseIf _pokemon.Gender = Pokemon.Genders.Female Then
|
ElseIf _pokemon.Gender = Pokemon.Genders.Female Then
|
||||||
genderString = " "
|
genderString = " ♀"
|
||||||
genderUnicode = 157
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Rename " & Me._defaultName & genderString & "?", New Vector2(CInt(Core.windowSize.Width / 2) - 182 + 25, 93), Color.Black)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Rename " & Me._defaultName & genderString & "?", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString("Rename " & Me._defaultName & genderString & "?").X / 2) + 2, 96 + 2), Color.Black)
|
||||||
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Rename " & Me._defaultName & genderString & "?", New Vector2(CInt(Core.windowSize.Width / 2) - 182 + 22, 90), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Rename " & Me._defaultName & genderString & "?", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString("Rename " & Me._defaultName & genderString & "?").X / 2), 96), Color.White)
|
||||||
|
|
||||||
If genderUnicode <> 0 Then
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.TextFont, StringHelper.GetChar(genderUnicode), New Vector2(CInt(Core.windowSize.Width / 2) + FontManager.InGameFont.MeasureString("Rename " & Me._defaultName).X - 147, 93), Color.Black, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.TextFont, StringHelper.GetChar(genderUnicode), New Vector2(CInt(Core.windowSize.Width / 2) + FontManager.InGameFont.MeasureString("Rename " & Me._defaultName).X - 150, 90), Color.White, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
|
||||||
End If
|
|
||||||
|
|
||||||
ChooseBox.Showing = False
|
ChooseBox.Showing = False
|
||||||
Else
|
Else
|
||||||
@ -130,23 +122,16 @@ Public Class NameObjectScreen
|
|||||||
Dim genderUnicode As Integer = 0
|
Dim genderUnicode As Integer = 0
|
||||||
If _renamePokemon = True Then
|
If _renamePokemon = True Then
|
||||||
If _pokemon.Gender = Pokemon.Genders.Male Then
|
If _pokemon.Gender = Pokemon.Genders.Male Then
|
||||||
genderString = " "
|
genderString = " ♂"
|
||||||
genderUnicode = 156
|
|
||||||
ElseIf _pokemon.Gender = Pokemon.Genders.Female Then
|
ElseIf _pokemon.Gender = Pokemon.Genders.Female Then
|
||||||
genderString = " "
|
genderString = " ♀"
|
||||||
genderUnicode = 157
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Enter name for " & Me._defaultName & genderString & ":", New Vector2(CInt(Core.windowSize.Width / 2) - 182 + 25, 93), Color.Black)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Enter name for " & Me._defaultName & genderString & ":", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString("Enter name for " & Me._defaultName & genderString & ":").X / 2) + 2, 96 + 2), Color.Black)
|
||||||
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Enter name for " & Me._defaultName & genderString & ":", New Vector2(CInt(Core.windowSize.Width / 2) - 182 + 22, 90), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Enter name for " & Me._defaultName & genderString & ":", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString("Enter name for " & Me._defaultName & genderString & ":").X / 2), 96), Color.White)
|
||||||
|
|
||||||
If genderUnicode <> 0 Then
|
Canvas.DrawRectangle(New Rectangle(CInt(TextboxPosition().X) - 4, CInt(TextboxPosition().Y) - 4, 320 + 8, 32), New Color(101, 142, 255))
|
||||||
Core.SpriteBatch.DrawString(FontManager.TextFont, StringHelper.GetChar(genderUnicode), New Vector2(CInt(Core.windowSize.Width / 2) + FontManager.InGameFont.MeasureString("Enter name for " & Me._defaultName).X - 150, 93), Color.Black, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.TextFont, StringHelper.GetChar(genderUnicode), New Vector2(CInt(Core.windowSize.Width / 2) + FontManager.InGameFont.MeasureString("Enter name for " & Me._defaultName).X - 153, 90), Color.White, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 89, 136, 208, 32), New Color(101, 142, 255))
|
|
||||||
DrawTextBox()
|
DrawTextBox()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -156,17 +141,17 @@ Public Class NameObjectScreen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function TextboxPosition() As Vector2
|
Private Function TextboxPosition() As Vector2
|
||||||
Return New Vector2(CInt(Core.windowSize.Width / 2) - 85, 140)
|
Return New Vector2(CInt(Core.windowSize.Width / 2) - 160, 140)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub DrawTextBox()
|
Private Sub DrawTextBox()
|
||||||
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 85, 140, 200, 24), Color.White)
|
Canvas.DrawRectangle(New Rectangle(CInt(TextboxPosition().X), CInt(TextboxPosition().Y), 320, 24), Color.White)
|
||||||
|
|
||||||
Dim t As String = Me._currentText
|
Dim t As String = Me._currentText
|
||||||
If t.Length < 20 Then
|
If t.Length < 20 Then
|
||||||
t &= "_"
|
t &= "_"
|
||||||
End If
|
End If
|
||||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, TextboxPosition(), Color.Black)
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, t, TextboxPosition(), Color.Black)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
/importer:LocalizedFontTextureImporter
|
/importer:LocalizedFontTextureImporter
|
||||||
/processor:LocalizedFontTextureProcessor
|
/processor:LocalizedFontTextureProcessor
|
||||||
/processorParam:DefaultCharacter=?
|
/processorParam:DefaultCharacter=?
|
||||||
/processorParam:FirstCharacter=
|
/processorParam:FirstCharacter=
|
||||||
/processorParam:PremultiplyAlpha=True
|
/processorParam:PremultiplyAlpha=True
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Fonts/BMP/chatFont.png
|
/build:Fonts/BMP/chatFont.png
|
||||||
@ -50,7 +50,7 @@
|
|||||||
/importer:LocalizedFontTextureImporter
|
/importer:LocalizedFontTextureImporter
|
||||||
/processor:LocalizedFontTextureProcessor
|
/processor:LocalizedFontTextureProcessor
|
||||||
/processorParam:DefaultCharacter=?
|
/processorParam:DefaultCharacter=?
|
||||||
/processorParam:FirstCharacter=
|
/processorParam:FirstCharacter=
|
||||||
/processorParam:PremultiplyAlpha=True
|
/processorParam:PremultiplyAlpha=True
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Fonts/BMP/InGame.png
|
/build:Fonts/BMP/InGame.png
|
||||||
@ -59,7 +59,7 @@
|
|||||||
/importer:LocalizedFontTextureImporter
|
/importer:LocalizedFontTextureImporter
|
||||||
/processor:LocalizedFontTextureProcessor
|
/processor:LocalizedFontTextureProcessor
|
||||||
/processorParam:DefaultCharacter=?
|
/processorParam:DefaultCharacter=?
|
||||||
/processorParam:FirstCharacter=
|
/processorParam:FirstCharacter=
|
||||||
/processorParam:PremultiplyAlpha=True
|
/processorParam:PremultiplyAlpha=True
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Fonts/BMP/mainFont.png
|
/build:Fonts/BMP/mainFont.png
|
||||||
@ -75,7 +75,7 @@
|
|||||||
/importer:LocalizedFontTextureImporter
|
/importer:LocalizedFontTextureImporter
|
||||||
/processor:LocalizedFontTextureProcessor
|
/processor:LocalizedFontTextureProcessor
|
||||||
/processorParam:DefaultCharacter=?
|
/processorParam:DefaultCharacter=?
|
||||||
/processorParam:FirstCharacter=
|
/processorParam:FirstCharacter=
|
||||||
/processorParam:PremultiplyAlpha=True
|
/processorParam:PremultiplyAlpha=True
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Fonts/BMP/TextFont.png
|
/build:Fonts/BMP/TextFont.png
|
||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |