Difference between revisions of "Component: Display Manager (Graphical Library)"
| Line 21: | Line 21: | ||
==Detailed description==  | ==Detailed description==  | ||
| + | The component can create the follow objects.  | ||
| + | Type_line - A simple straight line.  | ||
| + | Type_Rectangle - A simple rectangular box.  | ||
| + | Type_RectangeFilled - A filled rectangular box.  | ||
| + | Type_Ellipse - A simple ellipse or circle.  | ||
| + | Type_EllipseFilled - A filled ellipse or circle.  | ||
| + | Type_TextBox - A text area allowing a line of text to be displayed.  | ||
| + | The type can be entered by using the public constants. Begin with the Display Manager handle name followed by :: and the list of the public variables will be displayed.  | ||
| − | + | For example...  DisplayManager1::Type_TextBox  | |
==Examples==  | ==Examples==  | ||
| + | An example showing the creation of some text areas inside formatted shapes.  | ||
| − | + | {{Fcfile|DisplayManagerExample.fcfx|Display Manager Example}}  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Downloadable macro reference==  | ==Downloadable macro reference==  | ||
Revision as of 11:12, 13 January 2023
| Author | MatrixTSL | 
| Version | 1.0 | 
| Category | Graphical Library | 
Contents
Display Manager component
A component designed to simplify the process of drawing primitives and text onto a graphical display. Keeps track of coordinates so you don't have to. Also works great as a base layer for gLCD based games as it will check for collisions and perform movement.
Component Source Code
Please click here for the component source code: FC_Comp_Source_DisplayManager.fcfx
Detailed description
The component can create the follow objects.
Type_line - A simple straight line.
Type_Rectangle - A simple rectangular box.
Type_RectangeFilled - A filled rectangular box.
Type_Ellipse - A simple ellipse or circle.
Type_EllipseFilled - A filled ellipse or circle.
Type_TextBox - A text area allowing a line of text to be displayed.
The type can be entered by using the public constants. Begin with the Display Manager handle name followed by :: and the list of the public variables will be displayed.
For example... DisplayManager1::Type_TextBox
Examples
An example showing the creation of some text areas inside formatted shapes.
Downloadable macro reference
| MoveObject | |
| Moves an existing object to absolute coordinates on the screen. | |
| ObjectID | |
| X | |
| Y | |
| Return | |
| ShiftObject | |
| Shifts an existing object coordinates on the screen relative to the previous coordinates. | |
| ObjectID | |
| X | |
| Y | |
| Return | |
| DrawObject | |
| Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. | |
| ObjectID | |
| Return | |
| ScaleObject | |
| Changes the width and height of the selected Object | |
| ObjectID | |
| Width | |
| Height | |
| Return | |
| RedrawAll | |
| Clears the display and redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. | |
| Return | |
| CreateObject | |
| Define an object on the graphical LCD. Returns the Object ID. | |
| ObjectType | |
| X | |
| Y | |
| Width | |
| Height | |
| Return | |