very minor cleanup

This commit is contained in:
UnknownShadow200 2017-04-28 07:44:33 +10:00
parent b9fdc37928
commit b7d07f03a6
4 changed files with 5 additions and 9 deletions

View file

@ -5,7 +5,7 @@ using ClassicalSharp.Gui.Widgets;
using OpenTK.Input;
namespace ClassicalSharp.Gui.Screens {
public class ErrorScreen : ClickableScreen {
public class DisconnectScreen : ClickableScreen {
string title, message;
readonly Font titleFont, messageFont;
@ -13,7 +13,7 @@ namespace ClassicalSharp.Gui.Screens {
DateTime initTime, clearTime;
bool canReconnect;
public ErrorScreen(Game game, string title, string message) : base(game) {
public DisconnectScreen(Game game, string title, string message) : base(game) {
this.title = title;
this.message = message;

View file

@ -89,7 +89,7 @@
<Compile Include="2D\Screens\ChatScreen.cs" />
<Compile Include="2D\Screens\ClickableScreen.cs" />
<Compile Include="2D\Screens\DeathScreen.cs" />
<Compile Include="2D\Screens\ErrorScreen.cs" />
<Compile Include="2D\Screens\DisconnectScreen.cs" />
<Compile Include="2D\Screens\FpsScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.Input.cs" />

View file

@ -43,11 +43,7 @@ namespace ClassicalSharp {
static char[] trimChars = new char[] { ' ', '\0' };
StringBuffer logBuffer = new StringBuffer(128);
public void Add(string text) {
Log.Add(text);
LogChatToFile(text);
game.Events.RaiseChatReceived(text, MessageType.Normal);
}
public void Add(string text) { Add(text, MessageType.Normal); }
public void Add(string text, MessageType type) {
if (type == MessageType.Normal) {

View file

@ -267,7 +267,7 @@ namespace ClassicalSharp {
Drawer2D.InitColours();
BlockInfo.Reset(this);
TexturePack.ExtractDefault(this);
Gui.SetNewScreen(new ErrorScreen(this, title, reason));
Gui.SetNewScreen(new DisconnectScreen(this, title, reason));
GC.Collect();
}