fix debug windows
This commit is contained in:
@@ -8,6 +8,8 @@ TextWindow::TextWindow(unsigned from_col, unsigned to_col, unsigned from_row,
|
||||
this->from_row = from_row;
|
||||
this->to_row = to_row;
|
||||
this->use_cursor = use_cursor;
|
||||
|
||||
setPos(0,0);
|
||||
}
|
||||
|
||||
void TextWindow::setPos(unsigned rel_x, unsigned rel_y) {
|
||||
@@ -63,7 +65,7 @@ void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
|
||||
return;
|
||||
}
|
||||
|
||||
CGA::show(x_now, y_now, str[i], attrib);
|
||||
CGA::show(from_col + x_now, from_row + y_now, str[i], attrib);
|
||||
if(from_col+x_now >= to_col-1){
|
||||
x_now = 0;
|
||||
if(from_row + y_now >= to_row-1){
|
||||
|
||||
Reference in New Issue
Block a user