From 0af9c840293bff1a0ad699fdd9f3a549294feef9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 6 Aug 2017 20:03:10 -0400 Subject: wip shifter and infobox prison --- ShiftOS.Frontend/Commands.cs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'ShiftOS.Frontend/Commands.cs') diff --git a/ShiftOS.Frontend/Commands.cs b/ShiftOS.Frontend/Commands.cs index 29d8409..10003c4 100644 --- a/ShiftOS.Frontend/Commands.cs +++ b/ShiftOS.Frontend/Commands.cs @@ -48,6 +48,41 @@ namespace ShiftOS.Frontend { public static class FrontendDebugCommands { + [Command("infobox_prison")] + [ShellConstraint("shiftos_debug> ")] + public static void InfoboxPrison() + { + var ibox = new InfoboxMessage("Infobox Prison", "You are now sentenced to life in Infobox Prison."); + ibox.ShowPrompt(() => + { + InfoboxPrison(); + InfoboxPrison(); + }); + var t = new Thread(() => + { + var parent = ibox.Parent; + int xvel = 3; + int yvel = 3; + while (parent.Visible) + { + if (parent.X + parent.Width >= UIManager.Viewport.Width) + xvel = -xvel; + if (parent.X <= 0) + xvel = -xvel; + if (parent.Y <= 0) + yvel = -yvel; + if (parent.Y + parent.Height >= UIManager.Viewport.Height) + yvel = -yvel; + parent.X += xvel; + parent.Y += yvel; + Thread.Sleep(50); + } + InfoboxPrison(); + InfoboxPrison(); + }); + t.Start(); + } + [Command("set_ui_tint")] [RequiresArgument("color")] [ShellConstraint("shiftos_debug> ")] -- cgit v1.2.3