ScreenX

Introduction The ScreenX and ScreenY properties return the X and Y coordinates of the Cursor in pixel coordinates. These values represent the location of the cursor relative to the top-left of the game screen. These values will not be impacted by properties set on the Camera. These values can be used if you are manually[…]

Implements IClickable

Introduction The Implements IClickable property is a property that controls whether the Entity has a HasCursorOver  method. In other words, Entities which are IClickable can be tested to see if the user has highlighed or clicked an object with the Cursor Setting IClickable Entities can be created as IClickable in the add entity window. Existing[…]

IsOn3D

Introduction The IsOn3D method is a very powerful method that can be used to test if the cursor is over an object. IsOn3D is used by Glue generated code to test if the Cursor is over an Entity if the Entity implements IClickable or IWindow. The IsOn3D method is very powerful and flexible. It considers:[…]

WorldYAt

Introduction The WorldXAt and WorldYAt methods are useful for finding the absolute world position of the Cursor at a given Z value. These methods should generally be used only when dealing with an unrotated Camera. For more information on limitations see below. If you are dealing with a 2D Camera (the default) then you can[…]

GetRay

Introduction The GetRay method can be used to get a Ray representing objects which the Cursor is over. This Ray can be used for complex object picking, and will work even when the Camera is rotated, unlike the WorldXAt and WorldYAt methods. Code Example The following code shows how the GetRay function can be used[…]

PrimaryPushTime

FlatRedBall.Gui.Cursor Introduction The PrimaryPushTime property returns the amount of time since the Cursor’s PrimaryPush was last set to true. This value will return 0 if the PrimaryPush was just set, or if the Cursor’s PrimaryDown is false. Otherwise, this value will be greater than 0. This value can be used to detect how long the[…]

WorldXAt

Introduction The WorldXAt and WorldYAt methods are useful for finding the position of the Cursor at a given Z value. These methods should generally be used only when dealing with an unrotated Camera. For more information on limitations see below. If you are dealing with a 2D Camera (the default) then you can use a[…]

FlatRedBall.Gui.GuiManager

Introduction The GuiManager is a static object responsible for common UI element management as well as some UI creation. There are two categories of UI elements: Default FlatRedBall GUI objects which are usually used for debugging and tools (these are used in all FRB graphical tools like the SpriteEditor, PolygonEditor, etc) Glue Entities inheriting from[…]