Skip to content

Instantly share code, notes, and snippets.

@thefiddler
Created November 19, 2014 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefiddler/e609c79af7b6949109e0 to your computer and use it in GitHub Desktop.
Save thefiddler/e609c79af7b6949109e0 to your computer and use it in GitHub Desktop.
WindowState change test
using System;
using OpenTK;
namespace minmax
{
class MainClass
{
public static void Main(string[] args)
{
using (var gw = new GameWindow())
{
gw.WindowStateChanged += (object sender, EventArgs e) =>
{
Console.WriteLine(gw.WindowState);
};
gw.Resize += (object sender, EventArgs e) =>
{
Console.WriteLine("{0}x{1}", gw.Width, gw.Height);
};
gw.KeyDown += (object sender, OpenTK.Input.KeyboardKeyEventArgs e) =>
{
if (e.Key == OpenTK.Input.Key.Escape)
gw.Exit();
};
gw.Run(60);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment