Difference between revisions of "Component: Display Manager (Graphical Library)"
From Flowcode Help
Jump to navigationJump to search(10 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
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. | 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 Pack== |
+ | FREE | ||
+ | ==Detailed description== | ||
+ | The component can create the follow objects. | ||
+ | *'''Type_Line''' - 2 - A simple straight line. | ||
+ | *'''Type_Rectangle''' - 1 - A simple rectangular box. | ||
+ | *'''Type_RectangeFilled''' - 5 - A filled rectangular box. | ||
+ | *'''Type_Ellipse''' - 3 - A simple ellipse or circle. | ||
+ | *'''Type_EllipseFilled''' - 4 - A filled ellipse or circle. | ||
+ | *'''Type_TextBox''' - 0 - A text area allowing a line of text to be displayed. | ||
+ | The type can be entered by using the component's 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== | ||
Line 146: | Line 150: | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll''' | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. |
|- | |- | ||
|- | |- | ||
Line 193: | Line 197: | ||
| width="90%" | ObjectType | | width="90%" | ObjectType | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | 0=TextBox, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" | X | | width="90%" | X | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | X Pixel Coordinate |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" | Y | | width="90%" | Y | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Y Pixel Coordinate |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" | Width | | width="90%" | Width | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Pixel Width or X Radius |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" | Height | | width="90%" | Height | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Pixel Height or Y Radius |
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
− | |||
==Property reference== | ==Property reference== | ||
Line 239: | Line 240: | ||
|- | |- | ||
| colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. | | colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 11:38, 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 Pack
FREE
Detailed description
The component can create the follow objects.
- Type_Line - 2 - A simple straight line.
- Type_Rectangle - 1 - A simple rectangular box.
- Type_RectangeFilled - 5 - A filled rectangular box.
- Type_Ellipse - 3 - A simple ellipse or circle.
- Type_EllipseFilled - 4 - A filled ellipse or circle.
- Type_TextBox - 0 - A text area allowing a line of text to be displayed.
The type can be entered by using the component's 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 |
Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. | |
![]() |
Return |