Fix error in event listener.

This commit is contained in:
Anna Rose Wiggins 2024-07-30 19:49:39 -04:00 committed by annabunches
parent 610f1be3b7
commit 3f4237c19f
2 changed files with 9 additions and 4 deletions

View File

@ -3,7 +3,7 @@ local sprt = require "abase-sprite"
-- recolors all layers in the current sprite
local function RecolorLayers()
for i, layer in ipairs(app.sprite.layers) do
sprt.setColor(layer)
sprt.SetColor(layer)
end
end

View File

@ -74,14 +74,19 @@ end
local function safeSetColor(layer, color)
pixelValue = layer.color.rgbaPixel
--[[ print("safeSetColor: " .. pixelValue)
print(BASE_COLOR.rgbaPixel)
print(IGNORE_COLOR.rgbaPixel)
print(IGNORE_SUBCOLOR.rgbaPixel)
print(MERGE_COLOR.rgbaPixel)
print(MERGE_SUBCOLOR.rgbaPixel) ]]
if (pixelValue ~= BASE_COLOR.rgbaPixel and
pixelValue ~= IGNORE_COLOR.rgbaPixel and
pixelValue ~= IGNORE_SUBCOLOR.rgbaPixel and
pixelValue ~= MERGE_COLOR.rgbaPixel and
pixelValue ~= MERGE_SUBCOLOR.rgbaPixel) then
print("DEBUG: not setting color")
return
--[[ print("DEBUG: not setting color")
]] return
end
layer.color = color
end