mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 01:21:57 -05:00
very minor cleanup
This commit is contained in:
parent
b9fdc37928
commit
b7d07f03a6
4 changed files with 5 additions and 9 deletions
|
@ -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;
|
||||
|
|
@ -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" />
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue