Permalink
Browse files

name always shadowed for tab list in non-classic mode

  • Loading branch information...
UnknownShadow200 committed Jan 12, 2018
1 parent 7c084db commit 54906f3ddd6d19aa0b9f9db39b1f9db5a5079248
Showing with 7 additions and 7 deletions.
  1. +7 −7 ClassicalSharp/2D/Widgets/PlayerListWidget.cs
@@ -173,7 +173,7 @@ public class PlayerListWidget : Widget {
void AddName(byte id, int index) {
string name = TabList.Entries[id].ListName;
Texture tex = DrawName(name, false);
Texture tex = DrawName(name);
// insert at end of list
if (index == -1) { index = namesCount; namesCount++; }
@@ -201,13 +201,13 @@ public class PlayerListWidget : Widget {
void TabEntryRemoved(object sender, IdEventArgs e) {
for (int i = 0; i < namesCount; i++) {
if (IDs[i] != e.Id) continue;
RemoveAt(i);
DeleteAt(i);
SortAndReposition();
return;
}
}
void RemoveAt(int i) {
void DeleteAt(int i) {
Texture tex = textures[i];
gfx.DeleteTexture(ref tex);
@@ -230,10 +230,10 @@ public class PlayerListWidget : Widget {
Reposition();
}
Texture DrawName(string name, bool shadow) {
Texture DrawName(string name) {
if (game.PureClassic) name = Utils.StripColours(name);
DrawTextArgs args = new DrawTextArgs(name, font, shadow);
DrawTextArgs args = new DrawTextArgs(name, font, !classic);
Texture tex = game.Drawer2D.MakeTextTexture(ref args, 0, 0);
game.Drawer2D.ReducePadding(ref tex, Utils.Floor(font.Size), 3);
return tex;
@@ -286,7 +286,7 @@ class GroupComparer : IComparer<ushort> {
}
}
void DeleteGroup(ref int i) { RemoveAt(i); i--; }
void DeleteGroup(ref int i) { DeleteAt(i); i--; }
void AddGroup(ushort id, ref int index) {
for (int i = IDs.Length - 1; i > index; i--) {
IDs[i] = IDs[i - 1];
@@ -295,7 +295,7 @@ class GroupComparer : IComparer<ushort> {
IDs[index] = groupNameID;
string group = TabList.Entries[id].Group;
textures[index] = DrawName(group, true);
textures[index] = DrawName(group);
index++;
namesCount++;

0 comments on commit 54906f3

Please sign in to comment.