mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Perma colored background
This commit is contained in:
parent
63f88289f5
commit
c17f3af570
1 changed files with 21 additions and 13 deletions
|
@ -151,6 +151,16 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
I64 window_width = 80;
|
||||
I64 window_height = 25;
|
||||
|
||||
// CDoc *doc = DocPut;
|
||||
// Fs->display_doc->flags |= DOCF_SIZE_MIN;
|
||||
StrCopy(Fs->task_title, "TELNET - %d:%d", host, port);
|
||||
Fs->border_src = BDS_CONST;
|
||||
Fs->border_attr = LTGREEN << 4 + DriveTextAttrGet(':') & 15;
|
||||
Fs->text_attr = BLACK << 4 + WHITE;
|
||||
Fs->title_src = TTS_LOCKED_CONST;
|
||||
DocClear(Fs->border_doc, TRUE);
|
||||
// LBtr(&Fs->display_flags, DISPLAYf_SHOW);
|
||||
|
||||
Fs->win_width = window_width;
|
||||
WinHorz((TEXT_COLS / 2) - (Fs->win_width / 2),
|
||||
(TEXT_COLS / 2) - (Fs->win_width / 2) +
|
||||
|
@ -292,7 +302,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
for (m = 0; m <= ansi_param_count; m++) {
|
||||
if (ansi_code[m] <= 10) {
|
||||
switch (ansi_code[m]) {
|
||||
case 0: "$$BG,BLACK$$$$WHITE$$"; isBright = FALSE; break; // reset
|
||||
case 0: "$$BG$$$$FG$$"; isBright = FALSE; break; // reset
|
||||
case 1: isBright = TRUE; break;
|
||||
case 2: isBright = FALSE; break;
|
||||
}
|
||||
|
@ -310,8 +320,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
case 35: "$$PURPLE$$"; break;
|
||||
case 36: "$$CYAN$$"; break;
|
||||
case 37: "$$WHITE$$"; break;
|
||||
case 39: "$$WHITE$$"; break; // reset
|
||||
// case 39: "$$FG$$"; break; // would normally call $$FG$$ but telnet actually resets to white
|
||||
case 39: "$$FG$$"; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +342,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
case 36: "$$LTCYAN$$"; break;
|
||||
case 97:
|
||||
case 37: "$$LTGRAY$$"; break;
|
||||
case 39: "$$WHITE$$"; break; // reset
|
||||
case 39: "$$FG$$"; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -353,8 +362,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
case 45: "$$BG,PURPLE$$"; break;
|
||||
case 46: "$$BG,CYAN$$"; break;
|
||||
case 47: "$$BG,WHITE$$"; break;
|
||||
case 49: "$$BG,BLACK$$"; break; // reset
|
||||
// case 49: "$$BG$$"; break; // would normally call $$BG$$ but telnet actually resets to black
|
||||
case 49: "$$BG$$"; break; // reset
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -376,8 +384,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
case 46: "$$BG,LTCYAN$$"; break;
|
||||
case 107:
|
||||
case 47: "$$BG,LTGRAY$$"; break;
|
||||
case 49: "$$BG,BLACK$$"; break; // reset
|
||||
// case 49: "$$BG$$"; break; // would normally call $$BG$$ but telnet actually resets to black
|
||||
case 49: "$$BG$$"; break; // reset
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -401,13 +408,14 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
|||
case 'C':
|
||||
// Cursor Right
|
||||
// SysLog("Cursor Right %d %d\n", ansi_param_count, ansi_code[0]);
|
||||
// "$$CM,%d,0$$", ansi_code[0];
|
||||
"$$CM,%d,0$$", ansi_code[0];
|
||||
// NOTE: this has been "fixed" since we now change the window's background color
|
||||
// if we just move the cursor,
|
||||
// you dont get the colored background since we skip over it directly
|
||||
I64 C;
|
||||
for (C = 0; C < ansi_code[0]; C++) {
|
||||
" ";
|
||||
}
|
||||
// I64 C;
|
||||
// for (C = 0; C < ansi_code[0]; C++) {
|
||||
// " ";
|
||||
// }
|
||||
ptr++;
|
||||
break;
|
||||
case 'D':
|
||||
|
|
Loading…
Reference in a new issue