/// <summary> /// Draw Stimuli /// </summary> protected override void Draw() { GraphicsDevice.Clear(ex.Exdesign.bgcolor); if (GO_OVER) { grating.Draw(GraphicsDevice); ex.Flow.Info = ex.Flow.TrialCount.ToString() + " / " + ex.Exdesign.trial.ToString() + " Trials\n" + ex.Flow.StiCount.ToString() + " / " + ex.Exdesign.stimuli[0].ToString() + " Stimuli"; text.Draw(ex.Flow.Info); } else { text.Draw(); } }
protected override void Draw() { GraphicsDevice.Clear(Bgcolor); string Tip = null, Help = null; switch (CurrentSti) { case VSType.Grating: Grating.Draw(GraphicsDevice); Tip = "Diameter: " + Grating.Para.BasePara.diameter.ToString("F2") + "\nDirection: " + Grating.Para.BasePara.direction.ToString("F1") + "\nLocation: [" + Grating.Para.BasePara.center.X.ToString("F2") + ", " + Grating.Para.BasePara.center.Y.ToString("F2") + "]" + "\nSF: " + Grating.Para.sf.ToString("F2") + " TF: " + Grating.Para.tf.ToString("F2"); Help = "Diameter(W/S) Type(Space)\nSF(D/F) TF(Z/X) Shape(E)\nMask(M) MaskSigma(T/Y)" + "\nLHColor(R/G/B + Up/Down)\nRLColor(R/G/B + Left/Right)\nAlpha(A + Up/Down)"; break; default: Bar.Draw(GraphicsDevice); Tip = "Width: " + Bar.Para.width.ToString("F2") + " Height: " + Bar.Para.height.ToString("F2") + "\nOrientation: " + Bar.Para.BasePara.orientation.ToString("F1") + "\nLocation: [" + Bar.Para.BasePara.center.X.ToString("F2") + ", " + Bar.Para.BasePara.center.Y.ToString("F2") + "]"; Help = "Width(A/D) Height(W/S)\nColor(Z/X) BgColor(C/V)\n ReverseColor(Space)"; break; } Cross.Draw(GraphicsDevice); if (HelpText < 2) { SLText.Draw(Tip); SLText.Draw(new Vector2(5, GraphicsDevice.Viewport.Height - 25), "Help(F1) / ToggleFullScreen(F2) / Stimulus(Q)", Color.SkyBlue); if (HelpText > 0) { SLText.Draw(new Vector2(GraphicsDevice.Viewport.Width - 250, 5), Help, Color.Tomato); } } }
protected override void Draw() { GraphicsDevice.Clear(Color.Gray); if (GO_OVER) { audio.PauseAll(); video.Play(); video.Draw(); } else { audio.ResumeAll(); video.Stop(); //bar.Draw(GraphicsDevice); grating.SetTime((float)timer.ElapsedSeconds); grating.Draw(GraphicsDevice); //image.Draw(new Rectangle(210, 100, 400, 200), Color.White); //quad.Draw(GraphicsDevice); model.Ori3DMatrix = Matrix.CreateRotationY((float)timer.ElapsedSeconds); model.Draw(GraphicsDevice); //point.Draw(GraphicsDevice); circle.Draw(GraphicsDevice); //disk.Draw(GraphicsDevice); //cross.Draw(GraphicsDevice); //arrow.Draw(GraphicsDevice); radialcircle.Draw(GraphicsDevice); //gaussian.Draw(GraphicsDevice); vsc.BatchDraw(GraphicsDevice); //vscp.Draw(GraphicsDevice); text.Draw(new Vector2(5, 5), SLConstant.Help + "\n" + frameinfo.FPS.ToString() + " FPS", Color.PeachPuff); text.Draw(new Vector2(5, 70), "Unicode Text: ¦«¦²¦µ¦¶¦·¦¸¦°", Color.Red, 10f * (float)SLConstant.Rad_p_Deg, Vector2.Zero, Vector2.One); } }
protected override void Draw() { GraphicsDevice.Clear(Color.Gray); if (GO_OVER) { audio.PauseAll(); model.Ori3DMatrix = Matrix.CreateRotationY((float)timer.ElapsedSeconds); model.Draw(GraphicsDevice); } else { audio.ResumeAll(); //bar.Draw(GraphicsDevice); grating.SetTime((float)timer.ElapsedSeconds); grating.Draw(GraphicsDevice); //cross.Draw(GraphicsDevice); //arrow.Draw(GraphicsDevice); text.Draw(new Vector2(10, 10), SLConstant.Help + "\n" + frameinfo.FPS.ToString() + " FPS", Color.PeachPuff); text.Draw(new Vector2(10, 80), serverstate, Color.Red); } }