add (colored) textwindow

This commit is contained in:
Eggert Jung
2025-04-26 17:27:56 +02:00
parent 9ae9f6fd78
commit 563d30f9f2
2 changed files with 25 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
#include "textstream.h"
#include "../arch/lapic.h"
TextStream::TextStream(unsigned from_col,
unsigned to_col,
@@ -9,10 +10,14 @@ TextStream::TextStream(unsigned from_col,
to_col,
from_row,
to_row,
use_cursor){}
use_cursor){
CGA::Color fg = static_cast<CGA::Color>((LAPIC::getID() + 1 ));
this->reset(' ', CGA::Attribute(CGA::LIGHT_GREEN, fg, false));
}
void TextStream::flush() {
print(buffer,pos);
CGA::Color fg = static_cast<CGA::Color>((LAPIC::getID() + 1 ));
print(buffer,pos,CGA::Attribute(CGA::LIGHT_GREEN, fg, false));
pos = 0;
}