Introduction IsMouseVisible can be set to true to display the mouse cursor. This value defaults to false which means the mouse will be invisible when it is over the game window. Code Example The following code shows how to make the mouse cursor visible. It assumes the code is written in Game1.cs, so it uses[…]


Introduction The GameWindow class represents the window that the game is rendering at. This is typically accessed through the XNA Game’s Window property. iOS The resolution of the game window can depend on the presence of splash screen files. For more information, see this discussion:×320/591


Introduction ClientSizeChanged is an event which is raised whenever the window is resized. Unfortunately this event is only raised when the window is resized by dragging the corners/edges, or when the window is maximized. Once the window is maximized, clicking the maximize button to restore the window will not raise this event. Therefore, it is[…]


Introduction The IsActive property can tell you if the Game window has focus. This is useful if you are building applications or games which you do not want to receive input if the window is not in focus. For example, if a Game is behind another Window, but the game responds to mouse clicks, the[…]


Introduction The TargetElapsedTime member allows you to control the update frame rate of your game. This value controls how often the Update method is called. It does not control how frequently your game is rendered to the screen.. In other words, if your game is rendering at 60 frames per second, but you modify this[…]

Microsoft.Xna.Framework.Game:Resizing the Game Window for Tools

Introduction When creating a tool using FlatRedBall XNA, the tool must react to window resizing events. By default when the Game Window is resized, the Camera only changes its DestinationRectangle and AspectRatio. Therefore, if a Sprite takes up the entire screen horizontally, it will take up the entire screen horizontally after the resize, as shown[…]

Dear ImGui Integration

The Dear ImGui open source library provides a cross-platform way to quickly make user interfaces.  While it is not as pretty as interfaces made in Gum, it does allow for quick creation of powerful UIs for certain audiences.  It has found significant usage for in-engine game development tools, even in high profile AAA games such as the[…]


Introduction The Game property returns a reference to the Microsoft.Xna.Framework.Game object. This will match the Game-inheriting class that is the root of all FlatRedBall games, usually called “Game1”. For more information, see the Game page. Code Example // Sets the cursor to be visible on PC games: FlatRedBallServices.Game.IsMouseVisible = true;

Customizing Cursor Visuals:Windows RT

Introduction Windows RT supports a custom cursor. This article discusses how to modify the cursor to use custom visuals. Setup This project assumes a working Windows RT project. It also assumes that the cursor is visible. For more information on making the cursor visible, see this page. Creating a C++ project to house the resource[…]