default skin changed to support extra info in columnlist row

This commit is contained in:
Stepets 2014-11-09 18:19:23 +03:00
parent 839db5491d
commit c3cda0bff2

View File

@ -1677,18 +1677,23 @@ function skin.DrawColumnListRow(object)
love.graphics.rectangle("fill", x, y, width, height) love.graphics.rectangle("fill", x, y, width, height)
end end
love.graphics.setFont(font)
if selected then
love.graphics.setColor(textselectedcolor)
elseif hover then
love.graphics.setColor(texthovercolor)
else
love.graphics.setColor(textcolor)
end
for k, v in ipairs(columndata) do for k, v in ipairs(columndata) do
love.graphics.setFont(font) local rwidth = parent.parent:GetColumnWidth(k)
local text = ParseRowText(v, x, parent.parent:GetColumnWidth(k), x, textx) if rwidth then
if selected then local text = ParseRowText(v, x, rwidth, x, textx)
love.graphics.setColor(textselectedcolor) love.graphics.print(text, x + textx, y + texty)
elseif hover then x = x + parent.parent.children[k]:GetWidth()
love.graphics.setColor(texthovercolor)
else else
love.graphics.setColor(textcolor) break
end end
love.graphics.print(text, x + textx, y + texty)
x = x + parent.parent.children[k]:GetWidth()
end end
end end