mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-21 18:25:55 +02:00
* Update color parsing. WIP
This commit is contained in:
parent
6c841105ab
commit
1264cdde01
1 changed files with 12 additions and 1 deletions
|
@ -274,7 +274,7 @@ function ANSIEscapeParser(options) {
|
|||
|
||||
for(i = 0, len = args.length; i < len; ++i) {
|
||||
arg = args[i];
|
||||
if(0x00 === arg) {
|
||||
/*if(0x00 === arg) {
|
||||
self.flags = 0x00;
|
||||
self.resetColor();
|
||||
} else {
|
||||
|
@ -286,6 +286,17 @@ function ANSIEscapeParser(options) {
|
|||
//case 4 : self.bgColor = arg - 40; break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
if(arg >= 30 && arg <= 37) {
|
||||
self.fgColor = arg;
|
||||
} else if(arg >= 40 && arg <= 47) {
|
||||
self.bgColor = arg;
|
||||
} else {
|
||||
self.flags = arg;
|
||||
if(0 === arg) {
|
||||
self.resetColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue