diff --git a/ClassicalSharp/2D/Drawing/IDrawer2D.cs b/ClassicalSharp/2D/Drawing/IDrawer2D.cs index 99b17c187..4d212354d 100644 --- a/ClassicalSharp/2D/Drawing/IDrawer2D.cs +++ b/ClassicalSharp/2D/Drawing/IDrawer2D.cs @@ -229,20 +229,28 @@ namespace ClassicalSharp { } public void ReducePadding( ref Texture tex, int point ) { + ReducePadding( ref tex, point, 4 ); + } + + public void ReducePadding( ref int height, int point ) { + ReducePadding( ref height, point, 4 ); + } + + public void ReducePadding( ref Texture tex, int point, int scale ) { if( !UseBitmappedChat ) return; point = AdjTextSize( point ); - int padding = (tex.Height - point) / 4; + int padding = (tex.Height - point) / scale; float vAdj = (float)padding / Utils.NextPowerOf2( tex.Height ); tex.V1 += vAdj; tex.V2 -= vAdj; tex.Height -= padding * 2; } - public void ReducePadding( ref int height, int point ) { + public void ReducePadding( ref int height, int point, int scale ) { if( !UseBitmappedChat ) return; point = AdjTextSize( point ); - int padding = (height - point) / 4; + int padding = (height - point) / scale; height -= padding * 2; } } diff --git a/ClassicalSharp/2D/Screens/FpsScreen.cs b/ClassicalSharp/2D/Screens/FpsScreen.cs index 1031583b7..6b9c047d8 100644 --- a/ClassicalSharp/2D/Screens/FpsScreen.cs +++ b/ClassicalSharp/2D/Screens/FpsScreen.cs @@ -90,7 +90,7 @@ namespace ClassicalSharp.Gui { public override void Init() { font = new Font( game.FontName, 14 ); - posFont = new Font( game.FontName, 13, FontStyle.Italic ); + posFont = new Font( game.FontName, 14, FontStyle.Italic ); game.Events.ChatFontChanged += ChatFontChanged; fpsText = new ChatTextWidget( game, font ); diff --git a/ClassicalSharp/2D/Screens/HudScreen.cs b/ClassicalSharp/2D/Screens/HudScreen.cs index 6b28a8d23..f82003834 100644 --- a/ClassicalSharp/2D/Screens/HudScreen.cs +++ b/ClassicalSharp/2D/Screens/HudScreen.cs @@ -84,7 +84,8 @@ namespace ClassicalSharp.Gui { } public override void Init() { - playerFont = new Font( game.FontName, 16 ); + int size = game.Drawer2D.UseBitmappedChat ? 16 : 11; + playerFont = new Font( game.FontName, size ); chat = new ChatScreen( game ); chat.Init(); hotbar = new BlockHotbarWidget( game ); diff --git a/ClassicalSharp/2D/Widgets/PlayerList/ClassicPlayerListWidget.cs b/ClassicalSharp/2D/Widgets/PlayerList/ClassicPlayerListWidget.cs index 8651115a8..908d17313 100644 --- a/ClassicalSharp/2D/Widgets/PlayerList/ClassicPlayerListWidget.cs +++ b/ClassicalSharp/2D/Widgets/PlayerList/ClassicPlayerListWidget.cs @@ -131,7 +131,7 @@ namespace ClassicalSharp.Gui { void AddPlayerInfo( PlayerInfo pInfo, int index ) { DrawTextArgs args = new DrawTextArgs( pInfo.ColouredName, font, false ); Texture tex = game.Drawer2D.MakeChatTextTexture( ref args, 0, 0 ); - game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ) ); + game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ), 3 ); if( index < 0 ) { info[namesCount] = pInfo; diff --git a/ClassicalSharp/2D/Widgets/PlayerList/ExtPlayerListWidget.cs b/ClassicalSharp/2D/Widgets/PlayerList/ExtPlayerListWidget.cs index 9da8e59f6..458bc8e77 100644 --- a/ClassicalSharp/2D/Widgets/PlayerList/ExtPlayerListWidget.cs +++ b/ClassicalSharp/2D/Widgets/PlayerList/ExtPlayerListWidget.cs @@ -10,7 +10,7 @@ namespace ClassicalSharp.Gui { public ExtPlayerListWidget( Game game, Font font ) : base( game, font ) { textures = new Texture[512]; - titleFont = new Font( game.FontName, 16, FontStyle.Underline ); + titleFont = new Font( game.FontName, font.Size, FontStyle.Underline ); } PlayerInfo[] info = new PlayerInfo[512]; @@ -119,7 +119,7 @@ namespace ClassicalSharp.Gui { void AddPlayerInfo( CpeListInfo player, int index ) { DrawTextArgs args = new DrawTextArgs( player.ListName, font, true ); Texture tex = game.Drawer2D.MakeChatTextTexture( ref args, 0, 0 ); - game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ) ); + game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ), 3 ); if( index < 0 ) { info[namesCount] = new PlayerInfo( player ); @@ -164,7 +164,7 @@ namespace ClassicalSharp.Gui { void AddGroup( string group, ref int index ) { DrawTextArgs args = new DrawTextArgs( group, titleFont, true ); Texture tex = game.Drawer2D.MakeChatTextTexture( ref args, 0, 0 ); - game.Drawer2D.ReducePadding( ref tex, Utils.Floor( titleFont.Size ) ); + game.Drawer2D.ReducePadding( ref tex, Utils.Floor( titleFont.Size ), 3 ); PlayerInfo pInfo = new PlayerInfo( group ); PushDown( info, index, pInfo ); diff --git a/ClassicalSharp/2D/Widgets/PlayerList/NormalPlayerListWidget.cs b/ClassicalSharp/2D/Widgets/PlayerList/NormalPlayerListWidget.cs index 365b6d608..98f64fa0d 100644 --- a/ClassicalSharp/2D/Widgets/PlayerList/NormalPlayerListWidget.cs +++ b/ClassicalSharp/2D/Widgets/PlayerList/NormalPlayerListWidget.cs @@ -65,7 +65,7 @@ namespace ClassicalSharp.Gui { void AddPlayerInfo( Player player ) { DrawTextArgs args = new DrawTextArgs( player.DisplayName, font, true ); Texture tex = game.Drawer2D.MakeChatTextTexture( ref args, 0, 0 ); - game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ) ); + game.Drawer2D.ReducePadding( ref tex, Utils.Floor( font.Size ), 3 ); info[namesCount] = new PlayerInfo( player ); textures[namesCount] = tex;