|
|
|
|
@ -14,12 +14,23 @@ TextWindow::TextWindow(unsigned from_col, unsigned to_col, unsigned from_row,
|
|
|
|
|
setPos(0,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extern unsigned int testx, testy;
|
|
|
|
|
void TextWindow::setPos(unsigned rel_x, unsigned rel_y) {
|
|
|
|
|
unsigned abs_x = from_col + rel_x;
|
|
|
|
|
unsigned abs_y = from_row + rel_y;
|
|
|
|
|
|
|
|
|
|
if(abs_x >= CGA::COLUMNS)
|
|
|
|
|
return;
|
|
|
|
|
if(abs_y >= CGA::ROWS)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if(use_cursor){
|
|
|
|
|
CGA::setCursor(from_col + rel_x, from_row + rel_y);
|
|
|
|
|
testx = abs_x;
|
|
|
|
|
testy = abs_y;
|
|
|
|
|
CGA::setCursor(abs_x, abs_y);
|
|
|
|
|
}else{
|
|
|
|
|
pos_x = from_col + rel_x;
|
|
|
|
|
pos_y = from_row + rel_y;
|
|
|
|
|
pos_x = abs_x;
|
|
|
|
|
pos_y = abs_y;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|