Module:Sprite: Difference between revisions

Jump to navigation Jump to search
big test, if this works maybe things will be a bit better
m (Reverted edits by BluePsychoRanger (talk) to last revision by Epyon)
Tag: Rollback
(big test, if this works maybe things will be a bit better)
Line 125: Line 125:
autoScale = settings.autoscale,
autoScale = settings.autoscale,
image = (settings.image and getImage(settings.image))
image = (settings.image and getImage(settings.image))
or (settings.spriteSheet and getSpriteSheet(settings.spriteSheet))
-- or (settings.spriteSheet and getSpriteSheet(settings.spriteSheet))
}
}


Line 170: Line 170:
self:setPosition(self.__source.ids[itemName].pos)
self:setPosition(self.__source.ids[itemName].pos)
if self.__source.ids[itemName].spriteSheet then
if self.__source.ids[itemName].spriteSheet then
self.__settings.image = getSpriteSheet(self.__source.ids[itemName].spriteSheet)
-- self.__settings.image = getSpriteSheet(self.__source.ids[itemName].spriteSheet)
        self.__settings.classname = require(types[self.__source.ids[item].spriteSheet]).settings.classname
end
end
end
end
Line 179: Line 180:
self:setPosition(self.__source.ids[item].pos)
self:setPosition(self.__source.ids[item].pos)
if self.__source.ids[item].spriteSheet then
if self.__source.ids[item].spriteSheet then
            self.__settings.image = getSpriteSheet(self.__source.ids[item].spriteSheet)
            -- self.__settings.image = getSpriteSheet(self.__source.ids[item].spriteSheet)
            self.__settings.classname = require(types[self.__source.ids[item].spriteSheet]).settings.classname
         end
         end
else
else
Line 279: Line 281:


local source = self.__source
local source = self.__source
sprite:addClass(source.settings.classname)
sprite:addClass(self.__settings.classname or source.settings.classname)


if self.__settings.hideTooltip ~= true then
if self.__settings.hideTooltip ~= true then
184

edits

Navigation menu