added clear screen to console_output::render

This commit is contained in:
2024-07-06 20:00:22 -04:00
parent f252ffc59b
commit a4c5220019

View File

@ -70,6 +70,8 @@ std::string console_output::get_code(const int attr) {
} }
void console_output::render() { void console_output::render() {
out << "\x1B[2J\x1B[H";
for (std::size_t idx = 0; idx < contents.size(); ++idx) { for (std::size_t idx = 0; idx < contents.size(); ++idx) {
if (idx % DISPLAY_WIDTH == 0 && idx) if (idx % DISPLAY_WIDTH == 0 && idx)
out << std::endl; out << std::endl;