Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,659
edits
m (Changing text to lore) |
(Default tooltip name for js-less viewing) |
||
Line 95: | Line 95: | ||
tiles = 1, | tiles = 1, | ||
name = name, | name = name, | ||
title = title, | |||
lore = lore | lore = lore | ||
} | } | ||
Line 119: | Line 120: | ||
function Sprite:setItem(item) | function Sprite:setItem(item) | ||
-- js-less plaintext title | |||
self.__settings.name = item | |||
-- js-modified color title with lore | |||
if aliases[item] then | if aliases[item] then | ||
if aliases[item].text then | if aliases[item].text then | ||
Line 127: | Line 132: | ||
if aliases[item].title then | if aliases[item].title then | ||
if #aliases[item].title == 2 then | if #aliases[item].title == 2 then | ||
self.__settings. | self.__settings.title= aliases[item].title .. aliases[item].name | ||
else | else | ||
self.__settings. | self.__settings.title = aliases[item].title | ||
end | end | ||
elseif aliases[item].name then | elseif aliases[item].name then | ||
self.__settings. | self.__settings.title = aliases[item].name | ||
end | end | ||
else | else | ||
self.__settings. | self.__settings.title = item; | ||
end | end | ||
Line 215: | Line 220: | ||
sprite:addClass(source.settings.classname) | sprite:addClass(source.settings.classname) | ||
sprite:attr( "title", self.__settings.name ) | sprite:attr( "title", self.__settings.name ) | ||
sprite:attr( "data-title", self.__settings.title ) | |||
if self.__settings.lore then | if self.__settings.lore then |
edits