aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Main')
-rw-r--r--ShiftOS.Main/Apps/Breakout.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/ShiftOS.Main/Apps/Breakout.cs b/ShiftOS.Main/Apps/Breakout.cs
index db10962..4e41a14 100644
--- a/ShiftOS.Main/Apps/Breakout.cs
+++ b/ShiftOS.Main/Apps/Breakout.cs
@@ -75,14 +75,22 @@ namespace ShiftOS.Main.Apps
gameTimer.Stop();
var infoBox = ShiftWM.StartInfoboxSession("Breakout - You Lose! ", "It appears that you have lost the game, meaning\nall codepoints won were lost. Would you\nlike to try again?", InfoboxTemplate.ButtonType.YesNo);
ShiftWM.StartInfoboxSession(null, infoBox.isOK.ToString(), InfoboxTemplate.ButtonType.Ok);
- if (infoBox.isOK)
- {
- DrawBlocks();
- ResetToRest();
- gameTimer.Start();
- }
+ infoBox.btnOpt1.Click += InfoboxYes;
+ infoBox.btnOpt2.Click += InfoboxYes;
}
}
+
+ private void InfoboxYes(object sender, EventArgs e)
+ {
+ DrawBlocks();
+ ResetToRest();
+ gameTimer.Start();
+ }
+ private void InfoboxNo(object sender, EventArgs e)
+ {
+ // When user clicks No
+ }
+
private void DrawBlocks()
{
int h = 20;