Last updated
Was this helpful?
Last updated
Was this helpful?
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)
Entities inheriting from
For a Default FlatRedBall UI element to be visible and functional it must either belong to the GuiManager or another UI element. Entities are drawn by the engine like normal Entities - the GuiManager simply handles the cursor-based activity (like clicks).
When a is created and added to the GuiManager, it can be added to one of three internal lists. These lists define the three categories. These categories are:
Regular
Dominant
Perishable
The following sections define the characteristics of each category.
Adding a by calling its constructor then passing it to the GuiManager's AddWindow method will add the as a regular . Regular remain in memory until they are removed using the GuiManager's RemoveWindow method. Making a regular invisible will not remove it from the GuiManager.
Dominant are which consume interaction while they are visible. In other words, if a dominant is present, no other will receive input. Any can be made dominant through the method. Dominant are often used when the users attention is required on a particular . Examples include a asking if the program should really exit after clicking the close button or a for selecting a file to load in an application. Dominant can be removed by either calling the GuiManager's RemoveWindow method or by setting the dominant Visible property to false. Setting the Visible property to false will result in the GuiManager automatically removing the if is set to true.
Perishable are which will automatically be removed by the GuiManager when the user clicks and the Cursor is not over the perishable . Perishable Windows are most commonly used for Windows which have a short life span. Examples include the drop-down ListBoxes that appear when clicking the on or menus appearing when right-clicking on an object. If the user clicks on a perishable , the will not automatically remove itself. The removal is usually handled in one of the events in this case.
Did this article leave any questions unanswered? Post any question in our for a rapid response.