Permalink
Browse files

Fixed huge bug where cursor appears behind the leaderboards and menus

  • Loading branch information...
Brian Richards Brian Richards
Brian Richards authored and Brian Richards committed Nov 28, 2011
1 parent fc2d63c commit 21765624b37f8eb27f3f995b73bf0ce8e29606d4
Binary file not shown.
@@ -314,7 +314,7 @@ public enum GameMode
private Rect sceneRect;
private CircleTimer poseTimer = null;
- const double POSE_TIMER_INCREMENT_PER_FRAME = 2;
+ const double POSE_TIMER_INCREMENT_PER_FRAME = .5;
private const double CIRCLE_TIMER_WIDTH = 180;
private const double CIRCLE_TIMER_HEIGHT = 200;
@@ -472,7 +472,7 @@ public void AdvanceFrame()
{
if (DoThis)
{
- AddToScore(1, 10, new Point(300, 600));
+ AddToScore(1, 10, new Point(300, 400));
currPoseNum++;
KinectPose.SetSimon(KinectPose.GetNewPose(currPoseNum));
poseTimer.WedgeAngle = 0;
@@ -136,6 +136,7 @@ public void draw(UIElementCollection _element)
{
_element.Remove(LeaderBoardCanvas);
LeaderBoardCanvas.Children.Clear();
+ LeaderBoardCanvas.TranslatePoint(new Point(300, 400), LeaderBoardCanvas);
LeaderBoardCanvas.Children.Add(lbRectangle);
LeaderBoardCanvas.Children.Add(LeaderBoardHeader);
LeaderBoardCanvas.Children.Add(lbline);
@@ -13,14 +13,12 @@
<Path Name="Island" Fill="Beige" Stroke="Black" StrokeThickness="1" Data="M 0,575 L 100,475 L 250, 400 L 500,400 L 650,475 L 750,575" ></Path>
<Ellipse Name="Sun" Width="50" Height="50" Fill="Yellow" Canvas.Left="635" Canvas.Top="25"/>
</Canvas>
- <Canvas Name="SkeltalTracking" Grid.ColumnSpan="2">
- <Button Canvas.Left="356" Canvas.Top="458" Content="CreatePose" Height="23" Name="CreatePose" Width="75" Click="CreatePose_Click" />
- </Canvas>
<Canvas Name="SkeletonImages" Grid.ColumnSpan="2">
- <Canvas Name="SimonSaysPoseCanvas" Height="289" Width="777" Background="{x:Null}" ClipToBounds="True" Canvas.Left="1" Canvas.Top="163"></Canvas>
- <Canvas Name="PlayerPoseCanvas" Height="289" Width="777" Background="{x:Null}" ClipToBounds="True" Canvas.Left="1" Canvas.Top="163"></Canvas>
+ <Canvas Name="SimonSaysPoseCanvas" Panel.ZIndex="48" Height="289" Width="777" Background="{x:Null}" ClipToBounds="True" Canvas.Left="1" Canvas.Top="163"></Canvas>
+ <Canvas Name="PlayerPoseCanvas" Panel.ZIndex="49" Height="289" Width="777" Background="{x:Null}" ClipToBounds="True" Canvas.Left="1" Canvas.Top="163"></Canvas>
+ </Canvas>
+ <Canvas Name="topLayer" Panel.ZIndex="50">
</Canvas>
-
<!--kt:KinectColorViewer x:Name="kinectViewer" Margin="0,18,19,0" HorizontalAlignment="Right" Width="160" Height="120" VerticalAlignment="Top" /-->
</Grid>
@@ -457,14 +457,16 @@ private void HandleGameTimer(int param)
// For mouse support, uncomment the following lines
Point currMouse = System.Windows.Input.Mouse.GetPosition(grid);
currCursorPosition = currMouse;
+
game.checkHovers(currCursorPosition, this.grid);
playfield.Children.Clear();
playfield.Children.Add(Sun);
playfield.Children.Add(Island);
game.DrawFrame(playfield.Children, this.grid, currCursorPosition);
BannerText.Draw(playfield.Children);
- game.DrawCursor(currCursorPosition, playfield.Children);
+ topLayer.Children.Clear();
+ game.DrawCursor(currCursorPosition, topLayer.Children);
}
#endregion GameTimer/Thread
@@ -2,15 +2,15 @@
<HighScores>
<HighScore>
<Score>50</Score>
- <Initials>BLZ</Initials>
+ <Initials>MSH</Initials>
</HighScore>
<HighScore>
<Score>50</Score>
<Initials>CARTER</Initials>
</HighScore>
<HighScore>
<Score>50</Score>
- <Initials>MSH</Initials>
+ <Initials>BLZ</Initials>
</HighScore>
<HighScore>
<Score>25</Score>
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
- <security>
- <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
- </requestedPrivileges>
- </security>
- </trustInfo>
-</assembly>
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "B12E9C56E9EEC5F1A15BF2804106D366"
+#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "F381FF3F66F459A09E33D6B60BBD1DAC"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@@ -76,39 +76,31 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line 16 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SkeltalTracking;
+ internal System.Windows.Controls.Canvas SkeletonImages;
#line default
#line hidden
#line 17 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Button CreatePose;
+ internal System.Windows.Controls.Canvas SimonSaysPoseCanvas;
#line default
#line hidden
- #line 19 "..\..\..\MainWindow.xaml"
+ #line 18 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SkeletonImages;
+ internal System.Windows.Controls.Canvas PlayerPoseCanvas;
#line default
#line hidden
#line 20 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SimonSaysPoseCanvas;
-
- #line default
- #line hidden
-
-
- #line 21 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas PlayerPoseCanvas;
+ internal System.Windows.Controls.Canvas topLayer;
#line default
#line hidden
@@ -174,25 +166,16 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
this.Sun = ((System.Windows.Shapes.Ellipse)(target));
return;
case 6:
- this.SkeltalTracking = ((System.Windows.Controls.Canvas)(target));
+ this.SkeletonImages = ((System.Windows.Controls.Canvas)(target));
return;
case 7:
- this.CreatePose = ((System.Windows.Controls.Button)(target));
-
- #line 17 "..\..\..\MainWindow.xaml"
- this.CreatePose.Click += new System.Windows.RoutedEventHandler(this.CreatePose_Click);
-
- #line default
- #line hidden
+ this.SimonSaysPoseCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 8:
- this.SkeletonImages = ((System.Windows.Controls.Canvas)(target));
+ this.PlayerPoseCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 9:
- this.SimonSaysPoseCanvas = ((System.Windows.Controls.Canvas)(target));
- return;
- case 10:
- this.PlayerPoseCanvas = ((System.Windows.Controls.Canvas)(target));
+ this.topLayer = ((System.Windows.Controls.Canvas)(target));
return;
}
this._contentLoaded = true;
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "B12E9C56E9EEC5F1A15BF2804106D366"
+#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "F381FF3F66F459A09E33D6B60BBD1DAC"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@@ -76,39 +76,31 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line 16 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SkeltalTracking;
+ internal System.Windows.Controls.Canvas SkeletonImages;
#line default
#line hidden
#line 17 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Button CreatePose;
+ internal System.Windows.Controls.Canvas SimonSaysPoseCanvas;
#line default
#line hidden
- #line 19 "..\..\..\MainWindow.xaml"
+ #line 18 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SkeletonImages;
+ internal System.Windows.Controls.Canvas PlayerPoseCanvas;
#line default
#line hidden
#line 20 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas SimonSaysPoseCanvas;
-
- #line default
- #line hidden
-
-
- #line 21 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Canvas PlayerPoseCanvas;
+ internal System.Windows.Controls.Canvas topLayer;
#line default
#line hidden
@@ -174,25 +166,16 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
this.Sun = ((System.Windows.Shapes.Ellipse)(target));
return;
case 6:
- this.SkeltalTracking = ((System.Windows.Controls.Canvas)(target));
+ this.SkeletonImages = ((System.Windows.Controls.Canvas)(target));
return;
case 7:
- this.CreatePose = ((System.Windows.Controls.Button)(target));
-
- #line 17 "..\..\..\MainWindow.xaml"
- this.CreatePose.Click += new System.Windows.RoutedEventHandler(this.CreatePose_Click);
-
- #line default
- #line hidden
+ this.SimonSaysPoseCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 8:
- this.SkeletonImages = ((System.Windows.Controls.Canvas)(target));
+ this.PlayerPoseCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 9:
- this.SimonSaysPoseCanvas = ((System.Windows.Controls.Canvas)(target));
- return;
- case 10:
- this.PlayerPoseCanvas = ((System.Windows.Controls.Canvas)(target));
+ this.topLayer = ((System.Windows.Controls.Canvas)(target));
return;
}
this._contentLoaded = true;

0 comments on commit 2176562

Please sign in to comment.