Class for Microbit-like DD layer; created with DumbDisplay::createMicrobitLayer() More...
#include <dumbdisplay.h>
Public Member Functions | |
| MbDDLayer (int8_t layerId) | |
| for internal use only | |
| void | showIcon (MbIcon icon) |
| show Microbit icon | |
| void | showArrow (MbArrow arrow) |
| show Microbit arrow | |
| void | showNumber (int num) |
| show number; scroll if more than a single digit; but you get to control timing by using delay() | |
| void | showString (const String &str) |
| show string; scroll if more than a single character; but you get to control timing by using delay() | |
| void | plot (int x, int y) |
| turn on LED @ (x, y) | |
| void | unplot (int x, int y) |
| turn off LED @ (x, y) | |
| void | toggle (int x, int y) |
| toggle LED @ (x, y) on / off | |
| void | showLeds (const String &ledPattern) |
| void | ledColor (const String &color) |
| MbImage * | createImage (const String &ledPattern) |
| void | releaseImage (MbImage *pImage) |
| void | showImage (MbImage *pImage, int xOff) |
| void | scrollImage (MbImage *pImage, int xOff, long interval) |
Public Member Functions inherited from DDLayer | |
| void | border (float size, const String &color, const String &shape="flat", float extraSize=0) |
| void | noBorder () |
| void | padding (float size) |
| void | padding (float left, float top, float right, float bottom) |
| void | noPadding () |
| void | margin (float size) |
| void | margin (float left, float top, float right, float bottom) |
| void | noMargin () |
| void | backgroundColor (const String &color, int opacity=100) |
| void | noBackgroundColor () |
| void | backgroundImage (const String &backgroundImageName, const String &drawBackgroundOptions, int refImageWidth=0) |
| void | noBackgroundImage () |
| set no layer background image | |
| void | exportAsBackgroundImage (bool replace=true, bool noDrawBackground=true, int exportAsWidth=0) |
| void | animateBackgroundImage (float fps, bool reset=true, const String &options="") |
| void | stopAnimateBackgroundImage (bool reset=true) |
| void | visible (bool visible) |
| void | transparent (bool transparent) |
| void | disabled (bool disabled=true) |
| void | opacity (int opacity) |
| void | alpha (int alpha) |
| void | blend (const String &color, int alpha=255, const String &mode="darken") |
| void | noblend () |
| void | clear () |
| clear the layer | |
| void | flash () |
| normally used for "feedback" – flash the default way (layer + border) | |
| void | flashArea (int x, int y) |
| normally used for "feedback" – flash the area (x, y) where the layer is clicked | |
| void | explicitFeedback (int16_t x=0, int16_t y=0, const String &text="", DDFeedbackType type=DDFeedbackType::CLICK, const String &option="") |
| const String & | getLayerId () const |
| void | setFeedbackHandler (DDFeedbackHandler handler, const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
| void | enableFeedback (const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
| void | disableFeedback () |
| disable "feedback" | |
| const DDFeedback * | getFeedback () |
| void | debugOnly (int i) |
| for debug use | |
| DDFeedbackManager * | getFeedbackManager () const |
| DDFeedbackHandler | getFeedbackHandler () const |
Additional Inherited Members | |
Public Attributes inherited from DDObject | |
| int8_t | objectType |
| object type – DD_OBJECT_TYPE_LAYER or DD_OBJECT_TYPE_TUNNEL | |
| String | customData |
| custom data | |
Protected Member Functions inherited from DDLayer | |
| DDLayer (int8_t layerId) | |
| void | _enableFeedback () |
Protected Attributes inherited from DDLayer | |
| String | layerId |
| DDFeedbackManager * | pFeedbackManager |
| DDFeedbackHandler | feedbackHandler |
Class for Microbit-like DD layer; created with DumbDisplay::createMicrobitLayer()
| void MbDDLayer::ledColor | ( | const String & | color | ) |
set LED color
| color | DD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name" |
| void MbDDLayer::showLeds | ( | const String & | ledPattern | ) |
turn LEDs on by "pattern"