1
0
mirror of https://github.com/AR2000AR/openComputers_codes.git synced 2025-09-08 14:41:14 +02:00

[libGUI] bugfix when giving a ImageFile as argument

This commit is contained in:
2023-01-24 14:49:30 +01:00
parent b253b1ccc2
commit 42f6c8a32e

View File

@@ -11,7 +11,7 @@ Image.private.drawMethod = Image.DRAW_METHOD_OLD
Image.constructor = function(self, x, y, img, drawMethod)
if (type(img) == "string") then
self.imageData = ImageFile(img)
elseif (type("table") and img.class == "Image") then
elseif (type("table") and img.class == "ImageFile") then
self.imageData = img
end
if (drawMethod ~= nil) then self:setDrawMethod(drawMethod) end