mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-30 01:27:24 -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
|
@ -69,7 +69,7 @@ void LGEView::generate_frame_touche() {
|
|||
// 0D 96 02 12 0E 00 46 28 01 45 27 01 44 23 66 30
|
||||
std::vector<uint8_t> data{0x46, 0x28, 0x01, 0x45, 0x27, 0x01, 0x44, 0x23};
|
||||
|
||||
console.write("\n\x1B\x07Touche:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_LIGHT_GREY "Touche:");
|
||||
generate_lge_frame(0x96, (field_player.value() << 8) | field_room.value(), 0x0001, data);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ void LGEView::generate_frame_nickname() {
|
|||
|
||||
data.insert(data.end(), data_footer.begin(), data_footer.end());
|
||||
|
||||
console.write("\n\x1B\x0ESet nickname:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_YELLOW "Set nickname:");
|
||||
|
||||
generate_lge_frame(0x02, 0x001A, field_player.value(), data);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ void LGEView::generate_frame_team() {
|
|||
|
||||
data.push_back(field_team.value() - 1); // Color ?
|
||||
|
||||
console.write("\n\x1B\x0ASet team:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_GREEN "Set team:");
|
||||
|
||||
generate_lge_frame(0x03, data);
|
||||
}
|
||||
|
@ -173,9 +173,7 @@ void LGEView::generate_frame_broadcast_nickname() {
|
|||
|
||||
data.push_back(field_team.value());
|
||||
|
||||
console.write(
|
||||
"\n\x1B\x09"
|
||||
"Broadcast nickname:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_BLUE "Broadcast nickname:");
|
||||
|
||||
generate_lge_frame(0x04, data);
|
||||
}
|
||||
|
@ -187,14 +185,14 @@ void LGEView::generate_frame_start() {
|
|||
|
||||
// data[0] = field_room.value(); // ?
|
||||
|
||||
console.write("\n\x1B\x0DStart:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_MAGENTA "Start:");
|
||||
generate_lge_frame(0x05, data);
|
||||
}
|
||||
|
||||
void LGEView::generate_frame_gameover() {
|
||||
std::vector<uint8_t> data{(uint8_t)field_room.value()};
|
||||
|
||||
console.write("\n\x1B\x0CGameover:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_RED "Gameover:");
|
||||
generate_lge_frame(0x0D, data);
|
||||
}
|
||||
|
||||
|
@ -229,9 +227,7 @@ void LGEView::generate_frame_collier() {
|
|||
|
||||
data.push_back(checksum - id);
|
||||
|
||||
console.write(
|
||||
"\n\x1B\x06"
|
||||
"Config:\x1B\x10");
|
||||
console.write("\n" STR_COLOR_DARK_YELLOW "Config:");
|
||||
generate_lge_frame(0x00, 0x3713, 0x3713, data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue