diff options
Diffstat (limited to 'ShiftOS.Frontend/Commands.cs')
| -rw-r--r-- | ShiftOS.Frontend/Commands.cs | 14 |
1 files changed, 14 insertions, 0 deletions
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<string, object> 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<string, object> args) |
