1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-05-07 18:04:15 +00:00

setColour -> setPaletteColour

This commit is contained in:
Lignum 2017-05-07 12:40:31 +02:00
parent 287c6f172c
commit 156e74b69c
No known key found for this signature in database
GPG Key ID: 0889206F5A8A700D
3 changed files with 14 additions and 14 deletions

View File

@ -74,10 +74,10 @@ public class TermAPI implements ILuaAPI
"getBackgroundColour", "getBackgroundColour",
"getBackgroundColor", "getBackgroundColor",
"blit", "blit",
"setColour", "setPaletteColour",
"setColor", "setPaletteColor",
"getColour", "getPaletteColour",
"getColor" "getPaletteColor"
}; };
} }

View File

@ -57,10 +57,10 @@ public class MonitorPeripheral implements IPeripheral
"getBackgroundColour", "getBackgroundColour",
"getBackgroundColor", "getBackgroundColor",
"blit", "blit",
"setColour", "setPaletteColour",
"setColor", "setPaletteColor",
"getColour", "getPaletteColour",
"getColor" "getPaletteColor"
}; };
} }

View File

@ -72,7 +72,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
for i=0,15 do for i=0,15 do
local c = 2 ^ i local c = 2 ^ i
tPalette[c] = { parent.getColour( c ) } tPalette[c] = { parent.getPaletteColour( c ) }
end end
end end
@ -107,7 +107,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
end end
local function updatePalette() local function updatePalette()
return parent.setColour( tPalette ) return parent.setPaletteColour( tPalette )
end end
local function internalBlit( sText, sTextColor, sBackgroundColor ) local function internalBlit( sText, sTextColor, sBackgroundColor )
@ -286,7 +286,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
setTextColor( color ) setTextColor( color )
end end
function window.setColour( colour, r, g, b ) function window.setPaletteColour( colour, r, g, b )
if type(colour) == "table" then if type(colour) == "table" then
for k,v in pairs(colour) do for k,v in pairs(colour) do
tPalette[k] = v tPalette[k] = v
@ -305,13 +305,13 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
end end
end end
window.setColor = window.setColour window.setPaletteColor = window.setPaletteColour
function window.getColour( colour ) function window.getPaletteColour( colour )
return table.unpack( tPalette[ colour ] ) return table.unpack( tPalette[ colour ] )
end end
window.getColor = window.getColour window.getPaletteColor = window.getPaletteColour
local function setBackgroundColor( color ) local function setBackgroundColor( color )
if not parent.isColor() then if not parent.isColor() then