add reset
This commit is contained in:
@@ -61,6 +61,8 @@ void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TextWindow::reset(char character, CGA::Attribute attrib) {
|
void TextWindow::reset(char character, CGA::Attribute attrib) {
|
||||||
(void)character;
|
for(unsigned i=from_row; i<to_row; i++)
|
||||||
(void)attrib;
|
for(unsigned j=from_col; j<to_col; j++)
|
||||||
|
CGA::show(j, i, character, attrib);
|
||||||
|
setPos(0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
3
main.cc
3
main.cc
@@ -21,8 +21,9 @@ extern "C" int main() {
|
|||||||
|
|
||||||
//test textwindow implemantation
|
//test textwindow implemantation
|
||||||
TextWindow tw = TextWindow(0, 10, 0, 10, true);
|
TextWindow tw = TextWindow(0, 10, 0, 10, true);
|
||||||
|
tw.reset();
|
||||||
tw.setPos(0,0);
|
tw.setPos(0,0);
|
||||||
tw.print("test123", 7);
|
tw.print("lorem ipsum dolor sit amit", 26);
|
||||||
|
|
||||||
/* Start application processors
|
/* Start application processors
|
||||||
* To avoid unexpected behaviour, make sure that interrupts are not
|
* To avoid unexpected behaviour, make sure that interrupts are not
|
||||||
|
|||||||
Reference in New Issue
Block a user