Created
November 19, 2014 23:38
-
-
Save thefiddler/e609c79af7b6949109e0 to your computer and use it in GitHub Desktop.
WindowState change test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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