mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Clear with buffer clear
This commit is contained in:
parent
d175e33990
commit
ddffc69937
@ -570,7 +570,10 @@ Console::Console(
|
||||
{
|
||||
}
|
||||
|
||||
void Console::clear() {
|
||||
void Console::clear(bool clear_buffer = false) {
|
||||
if(clear_buffer)
|
||||
buffer.clear();
|
||||
|
||||
display.fill_rectangle(
|
||||
screen_rect(),
|
||||
Color::black()
|
||||
@ -595,10 +598,7 @@ void Console::write(std::string message) {
|
||||
pen_color = s.foreground;
|
||||
escape = false;
|
||||
} else {
|
||||
if (c=='\f') { //Add FORM FEED (clear screen)
|
||||
clear();
|
||||
buffer.clear();
|
||||
} else if (c == '\n') {
|
||||
if (c == '\n') {
|
||||
crlf();
|
||||
} else if (c == '\x1B') {
|
||||
escape = true;
|
||||
|
@ -312,7 +312,7 @@ class Console : public Widget {
|
||||
public:
|
||||
Console(Rect parent_rect);
|
||||
|
||||
void clear();
|
||||
void clear(bool clear_buffer);
|
||||
void write(std::string message);
|
||||
void writeln(std::string message);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user