Skip to content

Commit

Permalink
Updated screen function to return background color when applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
boxgaming committed Oct 11, 2024
1 parent d488fec commit d738122
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion qb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3385,7 +3385,17 @@ var QB = new function() {
if (!cdata) { return 0; }
var c = cdata.fgcolor;
if (!c) { return 0; }
return _lookupIndexedColor(c);
console.log(cdata.bgcolor);
c = _lookupIndexedColor(c);
if (!isNaN(c)) {
if (c < 16) {
var bg = _lookupIndexedColor(cdata.bgcolor);
if (!isNaN(bg) && bg > 0 && bg <= 7) {
c += bg*16;
}
}
}
return c;
}

function _lookupIndexedColor(c) {
Expand Down

0 comments on commit d738122

Please sign in to comment.