mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 07:10:43 -04:00
Declare escape strings for colored text (#1409)
* Color strings * Color strings * Color strings * Color strings * Color strings * Color strings & fix first group scrolling off screen * Color strings * Color strings * Clang * Clang * Clang attempt #3 * Update ui_painter.cpp * Update ui_widget.cpp * Clang test * Clang * Clang test * Update ui_about_simple.cpp * Update lge_app.cpp
This commit is contained in:
parent
9af1308e29
commit
cf25d85d51
9 changed files with 49 additions and 36 deletions
|
@ -57,8 +57,8 @@ int Painter::draw_string(
|
|||
|
||||
for (auto c : text) {
|
||||
if (escape) {
|
||||
if (c <= 15)
|
||||
pen = term_colors[c & 15];
|
||||
if (c < std::size(term_colors))
|
||||
pen = term_colors[(uint8_t)c];
|
||||
else
|
||||
pen = foreground;
|
||||
escape = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue