public override void Draw(GameTime gameTime) { if (!(gesture.Equals(""))) { tvPopup.message = gesture; } tvPopup.Draw(gameTime); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { spriteBatch.Begin(); //spriteBatch.Draw(gradientTexture, new Rectangle(0, 0, 1280, 720), Color.White); // if (!(gesture.Equals(""))) // tvPopup.message = gesture; // spriteBatch.DrawString(font, "gesture recognized: " + gesture, new Vector2(500, 500), Color.Orange); if (shouldPlay) { if (currentPlayer.State != MediaState.Stopped) { videoTexture = currentPlayer.GetTexture(); } } // Drawing to the rectangle will stretch the // video to fill the screen Rectangle screen = new Rectangle(graphics.Viewport.X, graphics.Viewport.Y, graphics.Viewport.Width, graphics.Viewport.Height); // Draw the video, if we have a texture to draw. if (videoTexture != null && shouldPlay) { spriteBatch.Draw(videoTexture, screen, Color.White); var br = tv.Brightness / 50f - 1f; if (br > 0) { spriteBatch.Draw(whitePixel, screen, new Color(br, br, br, br)); } else { spriteBatch.Draw(whitePixel, screen, new Color(0f, 0f, 0f, -br)); } } //spriteBatch.DrawString(font2, textToDraw, textPosition, Color.White); // button.Draw(spriteBatch); // hand.Draw(spriteBatch); if (skel != null) { if (leftDist > 0) //skel.Joints[JointType.WristLeft].Position.Y > skel.Joints[JointType.ElbowLeft].Position.Y && //skel.Joints[JointType.WristRight].Position.Y > skel.Joints[JointType.ElbowRight].Position.Y) { spriteBatch.Draw(leftArcTex, new Vector2(180, 660), null, Color.White, 0, new Vector2(160, 160), 1f, SpriteEffects.None, 0); spriteBatch.Draw(arrowTex, new Vector2(180, 660), null, Color.OrangeRed, leftAngle, new Vector2(7, 160), 1f, SpriteEffects.None, 0); spriteBatch.Draw(rightArcTex, new Vector2(1100, 660), null, Color.White, 0, new Vector2(160, 160), 1f, SpriteEffects.None, 0); if (rightDist > 0) { spriteBatch.Draw(arrowTex, new Vector2(1100, 660), null, Color.OrangeRed, rightAngle, new Vector2(7, 160), 1f, SpriteEffects.None, 0); } showAvatar = true; } } spriteBatch.End(); tvPopup.Draw(gameTime); //PrimitiveBatch.Begin(PrimitiveType.TriangleList, null); //var leftTrans = Matrix.CreateRotationZ(leftAngle); //PrimitiveBatch.AddVertex(new Vector2(-580, 280), Color.OrangeRed, Vector2.Zero); //PrimitiveBatch.AddVertex(new Vector2(-588, 280), Color.OrangeRed, Vector2.Zero); //PrimitiveBatch.AddVertex(new Vector2(-584, 220), Color.OrangeRed, Vector2.Zero); //PrimitiveBatch.End(); base.Draw(gameTime); }