new methods for lora

gui
This commit is contained in:
2020-06-25 21:47:55 +02:00
parent ccd7f119d3
commit ca661a9372
3 changed files with 122 additions and 1 deletions

View File

@@ -27,7 +27,13 @@ public:
setNeedsRedraw();
}
void setColorBackground(Color c) {
this->cBackground = c;
}
void setColorText(Color c) {
this->cText = c;
}
/** draw the label */
void draw(UIPainter& p) override {

View File

@@ -5,6 +5,8 @@
#include "../Draw.h"
#include "UIStructs.h"
#include <string>
class Setter;
class FontWrap;
@@ -34,6 +36,10 @@ public:
void drawText(const uint16_t x, const uint16_t y, const char* str) {
fnt_f1.draw(str, x, y, setter);
}
void drawText(const uint16_t x, const uint16_t y, const std::string& str) {
drawText(x, y, str.c_str());
}
void setFG(const Color fg) {
drawer.setColor(fg);