all todos for textwindow should be done

This commit is contained in:
Eggert Jung
2025-04-20 21:49:08 +02:00
parent 2d9d72e162
commit f03e33928b
3 changed files with 15 additions and 11 deletions

View File

@@ -20,9 +20,15 @@ void TextWindow::setPos(unsigned rel_x, unsigned rel_y) {
}
void TextWindow::getPos(unsigned& rel_x, unsigned& rel_y) const {
if(use_cursor){
CGA::getCursor(rel_x, rel_y);
rel_x -= from_col;
rel_y -= from_row;
}
else {
rel_x = pos_x - from_col;
rel_y = pos_y - from_row;
}
}
void TextWindow::setPos(int rel_x, int rel_y) {
@@ -35,8 +41,10 @@ void TextWindow::setPos(int rel_x, int rel_y) {
}
void TextWindow::getPos(int& rel_x, int& rel_y) const {
(void)rel_x;
(void)rel_y;
unsigned x, y;
getPos(x,y);
rel_x = x;
rel_y = y;
}
void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {