implement \n on textwindow

main
Eggert Jung 6 months ago
parent 2d64c0654f
commit 9ae9f6fd78

@ -51,6 +51,18 @@ void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
for(unsigned i=0; i<length; i++){
unsigned x_now, y_now;
getPos(x_now, y_now);
if(str[i] == '\n'){
x_now = 0;
if(from_row + y_now >= to_row-1){
//TODO scrollUp()
}
else{
y_now++;
}
setPos(x_now, y_now);
return;
}
CGA::show(x_now, y_now, str[i], attrib);
if(from_col+x_now >= to_col-1){
x_now = 0;

Loading…
Cancel
Save