SetCursor is no longer supported:This method is no longer supported in new versions of FlatRedBall; however its functionality is fully supported through the use of the Cursor class and Sprites. For an example on how to perform equivalent functionality, see this page. Introduction The SetCursor method can be used to customize the look and behavior[…]


Introduction Every Cursor in FlatRedBall belongs to a specific Camera. Since multiple Cameras can exist at a given time, Cursors must know which Camera to use to convert screen space to world space for collision against game objects including UI. By default the Cursor which can be accessed through GuiManager.Cursor uses the default Camera which[…]


Introduction The Enabled property determines whether a UI element will react to input events, such as being clicked. IWindow instances which have their Enabled value set to false will be skipped over by the Cursor when performing UI checks; these instances will never be assigned to the Cursor.WindowOver property.


Introduction IsOn returns whether the calling Cursor is over a given object. This function will not behave properly if the Camera is not viewing down the Z axis (default). If you have a rotated Camera, then you should use IsOn3D. This function does a position check – it does not consider if anything is covering[…]


Introduction The IMouseOver interface is an interface that is used to standardize checks between an object and the Cursor. IsMouseOver Code Example The following code checks to see if the Cursor is over an AxisAlignedRectangle. This example was created inside an Entity which contains an AxisAlignedRectangle instance called AxisAlignedRectangleInstance: Add the following to CustomInitialize to[…]


Introduction The IsPointInside method returns whether the argument X,Y are inside the Circle. The X and Y values are absolute values. Code Example The following shows how to check if the Cursor is inside a Circle instance: float worldX = GuiManager.Cursor.WorldXAt(0); float worldY = GuiManager.Cursor.WorldYAt(0); bool isInside = CircleInstance.IsPointInside(worldX, worldY);


Introduction The ClickNoSlide event is an event which is raised when the user presses and releases the mouse button or presses and releases on a touch screen without sliding. This method is useful for touch screen games which use sliding as a valid form of input. If a regular Click method is used instead of[…]


Introduction The PrimaryClick property returns whether the Cursor has been clicked this frame. A click is defined as: PrimaryDown was true last frame and… PrimaryDown is false this frame This occurs if the user pushes and releases the left moue button or touches and lifts on the touch screen. If developing games which may use a[…]


Introduction The PrimaryClickNoSlide property returns whether the Cursor has clicked (the primary button was down last frame, not this frame) and if the cursor has not moved more than ClickNoSlideThreshold during the time the button was down. This property is often used on touch screens so that the game can differentiate between when the user[…]


Introduction The IsFixedTimeStep property controls whether the game attempts to run at a fixed frame rate. If the game runs especially slow, then the frame rate may be reduced or frames may be dropped (this may vary from platform to platform). This property is true by default. If your game is capable of running at[…]