1

add attribute support, fg/bg in progress

This commit is contained in:
churl
2022-04-28 00:40:01 +02:00
parent 3322218708
commit 2861c07c1a
5 changed files with 74 additions and 24 deletions

View File

@ -13,16 +13,23 @@
void text_demo() {
/* Hier muess Code eingefuegt werden */
kout << "Test der Zahlenausgabefunktion:" << endl;
kout << endl;
kout << "| dec | hex | bin |" << endl;
kout << "+-------+-------+-------+" << endl;
kout << "Attribut (GREEN on WHITE, blinking): "
<< (unsigned short)kout.attribute(CGA::WHITE, CGA::GREEN, true) << endl
<< "Attribut (WHITE on BLACK, no blink): "
<< (unsigned short)kout.attribute(CGA::BLACK, CGA::WHITE, false) << endl
<< endl;
kout << "Test der Zahlenausgabefunktion:" << endl
<< endl
<< "| dec | hex | bin |" << endl
<< "+-------+-------+-------+" << endl;
// TODO: should fillw just work for the next << ?
for (unsigned short num = 0; num < 17; ++num) {
kout << fillw(0) << "| " << fillw(6) << dec << num;
kout << fillw(0) << "| " << fillw(6) << hex << num;
kout << fillw(0) << "| " << fillw(6) << bin << num;
kout << fillw(0) << "|" << endl;
kout << fillw(0) << "| " << fillw(6) << dec << num
<< fillw(0) << "| " << fillw(6) << hex << num
<< fillw(0) << "| " << fillw(6) << bin << num
<< fillw(0) << "|" << endl;
}
kout << endl;
}