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)
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
love.graphics.setFont(font)
local text = ParseRowText(v, x, parent.parent:GetColumnWidth(k), x, textx)
if selected then
love.graphics.setColor(textselectedcolor)
elseif hover then
love.graphics.setColor(texthovercolor)
local rwidth = parent.parent:GetColumnWidth(k)
if rwidth then
local text = ParseRowText(v, x, rwidth, x, textx)
love.graphics.print(text, x + textx, y + texty)
x = x + parent.parent.children[k]:GetWidth()
else
love.graphics.setColor(textcolor)
break
end
love.graphics.print(text, x + textx, y + texty)
x = x + parent.parent.children[k]:GetWidth()
end
end