From 97a5a97370bc8f4d721791457d551c6bd2b0b67c Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 5 Aug 2017 22:57:40 -0400 Subject: skin loader and ui tint --- ShiftOS.Frontend/Commands.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ShiftOS.Frontend/Commands.cs') diff --git a/ShiftOS.Frontend/Commands.cs b/ShiftOS.Frontend/Commands.cs index 19d229c..29d8409 100644 --- a/ShiftOS.Frontend/Commands.cs +++ b/ShiftOS.Frontend/Commands.cs @@ -41,11 +41,25 @@ using ShiftOS.Objects; using ShiftOS.Engine.Scripting; using ShiftOS.Objects.ShiftFS; using ShiftOS.Engine; +using Microsoft.Xna.Framework; +using ShiftOS.Frontend.GraphicsSubsystem; namespace ShiftOS.Frontend { public static class FrontendDebugCommands { + [Command("set_ui_tint")] + [RequiresArgument("color")] + [ShellConstraint("shiftos_debug> ")] + public static void SetUITint (Dictionary args) + { + string[] split = args["color"].ToString().Split(';'); + int r = MathHelper.Clamp(Convert.ToInt32(split[0]), 0, 255); + int g = MathHelper.Clamp(Convert.ToInt32(split[1]), 0, 255); + int b = MathHelper.Clamp(Convert.ToInt32(split[2]), 0, 255); + UIManager.SetUITint(new Color(r, g, b, 255)); + } + [Command("drop_opener")] [ShellConstraint("shiftos_debug> ")] public static void DropOpener(Dictionary args) -- cgit v1.2.3