mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 12:10:30 +00:00
Make color arguments to term.blit
case-insensitive (#929)
This commit is contained in:
parent
8ba20985d7
commit
06bf84f151
@ -419,6 +419,7 @@ public class Terminal
|
|||||||
{
|
{
|
||||||
if( c >= '0' && c <= '9' ) return c - '0';
|
if( c >= '0' && c <= '9' ) return c - '0';
|
||||||
if( c >= 'a' && c <= 'f' ) return c - 'a' + 10;
|
if( c >= 'a' && c <= 'f' ) return c - 'a' + 10;
|
||||||
|
if( c >= 'A' && c <= 'F' ) return c - 'A' + 10;
|
||||||
return 15 - def.ordinal();
|
return 15 - def.ordinal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,6 +265,8 @@ function create(parent, nX, nY, nWidth, nHeight, bStartVisible)
|
|||||||
if #sTextColor ~= #sText or #sBackgroundColor ~= #sText then
|
if #sTextColor ~= #sText or #sBackgroundColor ~= #sText then
|
||||||
error("Arguments must be the same length", 2)
|
error("Arguments must be the same length", 2)
|
||||||
end
|
end
|
||||||
|
sTextColor = sTextColor:lower()
|
||||||
|
sBackgroundColor = sBackgroundColor:lower()
|
||||||
internalBlit(sText, sTextColor, sBackgroundColor)
|
internalBlit(sText, sTextColor, sBackgroundColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user