aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/Commands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-08-06 20:03:10 -0400
committerMichael <[email protected]>2017-08-06 20:03:10 -0400
commit0af9c840293bff1a0ad699fdd9f3a549294feef9 (patch)
treee3375faf95fa454c602a988dd9de1513f5f39354 /ShiftOS.Frontend/Commands.cs
parent97a5a97370bc8f4d721791457d551c6bd2b0b67c (diff)
downloadshiftos_thereturn-0af9c840293bff1a0ad699fdd9f3a549294feef9.tar.gz
shiftos_thereturn-0af9c840293bff1a0ad699fdd9f3a549294feef9.tar.bz2
shiftos_thereturn-0af9c840293bff1a0ad699fdd9f3a549294feef9.zip
wip shifter and infobox prison
Diffstat (limited to 'ShiftOS.Frontend/Commands.cs')
-rw-r--r--ShiftOS.Frontend/Commands.cs35
1 files changed, 35 insertions, 0 deletions
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> ")]