diff --git a/ClassicalSharp/2D/Widgets/Chat/AltTextInputWidget.cs b/ClassicalSharp/2D/Widgets/Chat/AltTextInputWidget.cs index 43b5aeaef..89c195d22 100644 --- a/ClassicalSharp/2D/Widgets/Chat/AltTextInputWidget.cs +++ b/ClassicalSharp/2D/Widgets/Chat/AltTextInputWidget.cs @@ -7,10 +7,10 @@ namespace ClassicalSharp.Gui { public sealed partial class AltTextInputWidget : Widget { - public AltTextInputWidget( Game game, Font font, TextInputWidget parent ) : base( game ) { + public AltTextInputWidget( Game game, TextInputWidget parent ) : base( game ) { HorizontalAnchor = Anchor.LeftOrTop; VerticalAnchor = Anchor.BottomOrRight; - this.font = font; + font = new Font( game.FontName, 16 ); this.parent = parent; Active = false; } diff --git a/ClassicalSharp/2D/Widgets/Chat/TextGroupWidget.cs b/ClassicalSharp/2D/Widgets/Chat/TextGroupWidget.cs index 4ce9a5874..513685833 100644 --- a/ClassicalSharp/2D/Widgets/Chat/TextGroupWidget.cs +++ b/ClassicalSharp/2D/Widgets/Chat/TextGroupWidget.cs @@ -29,8 +29,11 @@ namespace ClassicalSharp.Gui { PlaceholderHeight = new bool[ElementsCount]; lines = new string[ElementsCount]; linkData = new LinkData[ElementsCount]; + DrawTextArgs args = new DrawTextArgs( "I", font, true ); - defaultHeight = game.Drawer2D.MeasureChatSize( ref args ).Height; + int height = game.Drawer2D.MeasureChatSize( ref args ).Height; + game.Drawer2D.ReducePadding( ref height, Utils.Floor( font.Size ) ); + defaultHeight = height; for( int i = 0; i < Textures.Length; i++ ) { Textures[i].Height = defaultHeight; diff --git a/ClassicalSharp/2D/Widgets/Chat/TextInputWidget.cs b/ClassicalSharp/2D/Widgets/Chat/TextInputWidget.cs index cf3f980cf..fdb557c0e 100644 --- a/ClassicalSharp/2D/Widgets/Chat/TextInputWidget.cs +++ b/ClassicalSharp/2D/Widgets/Chat/TextInputWidget.cs @@ -25,7 +25,7 @@ namespace ClassicalSharp.Gui { defaultHeight = Height = defSize.Height; this.font = font; - altText = new AltTextInputWidget( game, font, this ); + altText = new AltTextInputWidget( game, this ); altText.Init(); } diff --git a/ClassicalSharp/Utils/ErrorHandler.cs b/ClassicalSharp/Utils/ErrorHandler.cs index 1042ea219..565d98558 100644 --- a/ClassicalSharp/Utils/ErrorHandler.cs +++ b/ClassicalSharp/Utils/ErrorHandler.cs @@ -47,15 +47,15 @@ namespace ClassicalSharp { } string message = wroteToCrashLog ? - "The cause of the crash has been logged to \"" + logFile + "\". Please consider reporting the crash " + - "(and the circumstances that caused it) to github.com/UnknownShadow200/ClassicalSharp/issues" : + "The cause of the error has been logged to \"client.log\". Please consider reporting the error to " + + "github.com/UnknownShadow200/ClassicalSharp/issues so we can fix it." : - "Failed to write the cause of the crash to \"" + logFile + "\". Please consider reporting the crash " + - "(and the circumstances that caused it) to github.com/UnknownShadow200/ClassicalSharp/issues" + + "Failed to log the cause of the the error. Please consider reporting the circumstances " + + "of the error to github.com/UnknownShadow200/ClassicalSharp/issues so we can fix it." + Environment.NewLine + Environment.NewLine + error; - MessageBox.Show( "Oh dear. ClassicalSharp has crashed." + Environment.NewLine + - Environment.NewLine + message, "ClassicalSharp has crashed" ); + MessageBox.Show( "An error occured and ClassicalSharp was forced to close." + Environment.NewLine + + Environment.NewLine + message, "We're sorry" ); Environment.Exit( 1 ); }