From ad7caf40b720ab43a609b1985e7fc4b276b3a49e Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 12 Jan 2018 16:11:24 +1100 Subject: [PATCH] Group name should have back layer shadow --- ClassicalSharp.sln | 4 ++-- ClassicalSharp/2D/Widgets/PlayerListWidget.cs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ClassicalSharp.sln b/ClassicalSharp.sln index 2b2653be6..637ed5ce7 100644 --- a/ClassicalSharp.sln +++ b/ClassicalSharp.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 # SharpDevelop 4.4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassicalSharp", "ClassicalSharp\ClassicalSharp.csproj", "{BEB1C785-5CAD-48FF-A886-876BF0A318D4}" EndProject diff --git a/ClassicalSharp/2D/Widgets/PlayerListWidget.cs b/ClassicalSharp/2D/Widgets/PlayerListWidget.cs index 1b4f221c7..8255053aa 100644 --- a/ClassicalSharp/2D/Widgets/PlayerListWidget.cs +++ b/ClassicalSharp/2D/Widgets/PlayerListWidget.cs @@ -35,7 +35,7 @@ namespace ClassicalSharp.Gui.Widgets { TabListEntry[] entries = TabList.Entries; for (int id = 0; id < entries.Length; id++) { TabListEntry e = entries[id]; - if (e != null) AddPlayerInfo((byte)id, -1); + if (e != null) AddName((byte)id, -1); } SortAndReposition(); @@ -171,9 +171,9 @@ namespace ClassicalSharp.Gui.Widgets { } - void AddPlayerInfo(byte id, int index) { + void AddName(byte id, int index) { string name = TabList.Entries[id].ListName; - Texture tex = DrawName(name); + Texture tex = DrawName(name, false); // insert at end of list if (index == -1) { index = namesCount; namesCount++; } @@ -182,7 +182,7 @@ namespace ClassicalSharp.Gui.Widgets { } void TabEntryAdded(object sender, IdEventArgs e) { - AddPlayerInfo(e.Id, -1); + AddName(e.Id, -1); SortAndReposition(); } @@ -192,7 +192,7 @@ namespace ClassicalSharp.Gui.Widgets { Texture tex = textures[i]; gfx.DeleteTexture(ref tex); - AddPlayerInfo(e.Id, i); + AddName(e.Id, i); SortAndReposition(); return; } @@ -230,10 +230,10 @@ namespace ClassicalSharp.Gui.Widgets { Reposition(); } - Texture DrawName(string name) { + Texture DrawName(string name, bool shadow) { if (game.PureClassic) name = Utils.StripColours(name); - DrawTextArgs args = new DrawTextArgs(name, font, false); + DrawTextArgs args = new DrawTextArgs(name, font, shadow); Texture tex = game.Drawer2D.MakeTextTexture(ref args, 0, 0); game.Drawer2D.ReducePadding(ref tex, Utils.Floor(font.Size), 3); return tex; @@ -295,7 +295,7 @@ namespace ClassicalSharp.Gui.Widgets { IDs[index] = (short)-id; string group = TabList.Entries[id].Group; - textures[index] = DrawName(group); + textures[index] = DrawName(group, true); index++; namesCount++;