added: implementation of cursor

This commit is contained in:
2024-07-05 11:40:46 -04:00
parent 5515326248
commit 0201425cf1
3 changed files with 34 additions and 6 deletions

View File

@ -17,8 +17,14 @@ void cursor::show() const {
refresh();
}
void cursor::print_char(const position &pos, const char ch) const {
void cursor::print_char(const position &pos, const char ch, const int attrs) const {
attrset(attrs);
mvaddch(pos.y,pos.x,ch);
}
void cursor::print_str(const position &pos, const std::string str, const int attrs) const {
attrset(attrs);
mvaddstr(pos.y, pos.x, str.c_str());
}
bool check_terminal_size() {