Remove HSLColor.

This commit is contained in:
Paul Chote
2018-12-31 08:41:23 +00:00
parent ab4a7e3558
commit 3e404f6ac2
76 changed files with 256 additions and 416 deletions

View File

@@ -24,12 +24,12 @@ namespace OpenRA.Mods.Common.Scripting.Global
: base(context) { }
[Desc("Displays a text message at the top center of the screen.")]
public void SetMissionText(string text, HSLColor? color = null)
public void SetMissionText(string text, Color? color = null)
{
var luaLabel = Ui.Root.Get("INGAME_ROOT").Get<LabelWidget>("MISSION_TEXT");
luaLabel.GetText = () => text;
Color c = color.HasValue ? HSLColor.RGBFromHSL(color.Value.H / 255f, color.Value.S / 255f, color.Value.L / 255f) : Color.White;
var c = color.HasValue ? color.Value : Color.White;
luaLabel.GetColor = () => c;
}
}