Display
In Mini Micro, Display
is the base class for all the display types, and the class of any display that is off (mode 0). In addition, display
(all lowercase) is a function that returns one of the eight displays in Mini Micro's display system.
Contents
Architecture of the display system
Mini Micro supports eight simultaneous displays, numbered from 0 (frontmost) to 7 (in the back). Each display may be either off, or one of five more specific display types (solid color, text, pixels, tiles, or sprites). Any transparent or translucent areas of one display reveal the displays behind it. Behind all the display layers is solid black.
Display class
Property | Purpose |
---|---|
Display.mode | get or set the display mode |
Subclasses
display function
The global display
function returns a reference to the current display for the given layer number (0-7). Note that the display object in each layer changes when the mode is changed, so you will need to get a fresh reference (using this function) after changing the mode.
Arguments
Parameter Name | Type | Default Value | Meaning |
---|---|---|---|
n | number | 0 | display (layer) number to get |
Example
This example sets display layer 2 to pixel mode, clears it, and then draws a big translucent purple ellipse.
display(2).mode = displayMode.pixel
g = display(2)
g.clear
g.fillEllipse 0, 0, 960, 640, "#8800FF88"
See also: displayMode