Difference between revisions of "SolidColorDisplay"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "The <c>SolidColorDisplay</c> class in Mini Micro is a display type that represents a single color over the entire screen. It is often used to control overall background c...")
 
(added an example)
 
Line 13: Line 13:
 
| [[SolidColorDisplay.color]] || get or set the color of the display layer
 
| [[SolidColorDisplay.color]] || get or set the color of the display layer
 
|}
 
|}
 +
 +
== Example ==
 +
 +
The following example sets the background (display 7) to blue, and also clears the pixel display (layer 5) to clear so that the background can be seen.
 +
 +
<ms>clear
 +
display(7).color = color.blue
 +
display(5).clear color.clear</ms>
 +
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]

Latest revision as of 03:49, 14 January 2024

The SolidColorDisplay class in Mini Micro is a display type that represents a single color over the entire screen. It is often used to control overall background color of the screen, or as an overlay to fade the rest of the displays in or out.

Note that "solid" here refers to the entire display layer being one color. It does not imply that this color must be opaque; translucent colors work perfectly well.

By default, display 7 is configured as a solid black display (by the clear command).

Methods and Properties

Method or Property Purpose
SolidColorDisplay.color get or set the color of the display layer

Example

The following example sets the background (display 7) to blue, and also clears the pixel display (layer 5) to clear so that the background can be seen.

clear
display(7).color = color.blue
display(5).clear color.clear