Introduction

This sample showcases the capabilities of the GameWindow. It tracks keyboard, mouse and window events and displays the state of the GameWindow in real time.

Controls

Numbers 1-4 change the WindowState
Numbers 5-7 change the WindowBorder
Arrow keys move the GameWindow
+/- keys change the size of the GameWindow

Implementation

This sample provides a straightforward use-case of the IGameWindow interface:

1. The constructor hooks various IGameWindow events using anonymous delegates. The event handlers set flags to indicate that the current window state has changed.

2. The RenderFrame event checks those flags and refreshes the displayed text if the window state has changed.

3. The UpdateFrame event handles mouse and keyboard commands (see Controls section, above).