mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 17:17:42 +00:00
Add a TestField widget that supports a cursor.
This commit is contained in:
@@ -43,7 +43,7 @@ int Painter::draw_char(const Point p, const Style& style, const char c) {
|
||||
}
|
||||
|
||||
int Painter::draw_string(Point p, const Font& font, const Color foreground,
|
||||
const Color background, const std::string text) {
|
||||
const Color background, const std::string& text) {
|
||||
|
||||
bool escape = false;
|
||||
size_t width = 0;
|
||||
@@ -71,7 +71,7 @@ int Painter::draw_string(Point p, const Font& font, const Color foreground,
|
||||
return width;
|
||||
}
|
||||
|
||||
int Painter::draw_string(Point p, const Style& style, const std::string text) {
|
||||
int Painter::draw_string(Point p, const Style& style, const std::string& text) {
|
||||
return draw_string(p, style.font, style.foreground, style.background, text);
|
||||
}
|
||||
|
||||
|
@@ -49,8 +49,8 @@ public:
|
||||
int draw_char(const Point p, const Style& style, const char c);
|
||||
|
||||
int draw_string(Point p, const Font& font, const Color foreground,
|
||||
const Color background, const std::string text);
|
||||
int draw_string(Point p, const Style& style, const std::string text);
|
||||
const Color background, const std::string& text);
|
||||
int draw_string(Point p, const Style& style, const std::string& text);
|
||||
|
||||
void draw_bitmap(const Point p, const Bitmap& bitmap, const Color background, const Color foreground);
|
||||
|
||||
|
Reference in New Issue
Block a user