Permalink
Browse files

Combine NormalPlayerListWidget and ExtPlayerListWidget into one class

  • Loading branch information...
UnknownShadow200 committed Jan 12, 2018
1 parent 9066bf5 commit d1c3f85518f2a802f50481041f542febdb86d13b
View
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
# SharpDevelop 4.4
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassicalSharp", "ClassicalSharp\ClassicalSharp.csproj", "{BEB1C785-5CAD-48FF-A886-876BF0A318D4}"
EndProject
@@ -86,14 +86,10 @@ public class HudScreen : Screen, IGameComponent {
hotbar.Dispose();
hotbar.Init();
if (!hadPlayerList) return;
if (game.Server.UsingExtPlayerList && !game.UseClassicTabList) {
playerList = new ExtPlayerListWidget(game, playerFont);
} else {
playerList = new NormalPlayerListWidget(game, playerFont);
}
if (!hadPlayerList) return;
bool extended = game.Server.UsingExtPlayerList && !game.UseClassicTabList;
playerList = new PlayerListWidget(game, playerFont, !extended);
playerList.Init();
playerList.RecalcYOffset();
playerList.Reposition();
@@ -138,12 +138,10 @@ public sealed class ChatInputWidget : InputWidget {
List<string> matches = new List<string>();
game.Chat.Add(null, MessageType.ClientStatus3);
TabListEntry[] entries = game.TabList.Entries;
TabListEntry[] entries = TabList.Entries;
for (int i = 0; i < EntityList.MaxCount; i++) {
if (entries[i] == null) continue;
string rawName = entries[i].PlayerName;
string name = Utils.StripColours(rawName);
if (entries[i] == null) continue;
string name = entries[i].PlayerName;
if (Utils.CaselessStarts(name, part)) matches.Add(name);
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit d1c3f85

Please sign in to comment.