public override void Render() { ang += 1; GL.Clear(ClearFlags); back.DrawFullScreen(0, 0); GLExt.Color4(0.5f, 0.5f, 0.5f, 0.5f); // images at random z (0.0 - 1.0) for (int q = 0; q < 100; q++) { back.Draw(x[q], y[q], z[q], 0, 0.2f, 0.2f, false); // no blending } GLExt.Color4(1, 1, 1, 1); GLExt.Color4(1, 1, 1, (float)Math.Abs(Math.Sin(ang * 0.01f))); back.Draw(10, 10, 0, 1, 1, false); // no blending back.Draw(Settings.Width / 2 + 10, 10, 0, 1, 1, true); // blending GLExt.Color4(1, 1, 1, 1); // must invert mouse y img.Draw(Mouse.X, Settings.Height - Mouse.Y, mouseZ, ang, 1, 1, true); font.Write("2D-test.", 0, 0); font.Write("\nUse mouse wheel to move mouse pointer at Z-axis.\n\nPress ESC\nto start the next test.", 10, 20); //Console.WriteLine("> " + Mouse.X + " " + Mouse.Y); base.Render(); }
public override void Render() { GL.Clear(ClearFlags); back.DrawFullScreen(0, 0); crosshair.Draw(Mouse.X, Settings.Height - Mouse.Y); base.Render(); }
public override void Render() { GL.Clear(ClearFlags); GLExt.Color4((float)Mouse.X / Settings.Width, (float)Mouse.Y / Settings.Height, 1, 1); back.DrawFullScreen(0, 0); GLExt.Color4(1, 1, 1, 1); base.Render(); }
public override void Render() { GL.Clear(ClearFlags); back.DrawFullScreen(0, 0); if (Mouse[MouseButton.Left]) { } img[0].Draw(x, y, 0, 1, 1, true); font.Write("Hellurei", 0, 0); base.Render(); }
public override void Render() { ang += 1; GL.Clear(ClearFlags); back.DrawFullScreen(0, 0); int mouseY = Settings.Height - Mouse.Y; // invert mouse if (Mouse[MouseButton.Left]) { if (!clicked) { clicked = true; if (Mouse.X >= x && Mouse.X < x + img[tex].Width && mouseY >= y && mouseY < y + img[tex].Height) { visibleTime = 100; score++; snd1.Play(); } else { misses++; snd2.Play(); } } } else { clicked = false; } img[tex].Draw(x + img[tex].Width / 2, y + img[tex].Height / 2, ang, 1, 1, true); crosshair.Draw(Mouse.X, mouseY); font.Write("Hits: " + score + " " + "Misses: " + misses, 0, 0); base.Render(); }