mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
default skin changed to support extra info in columnlist row
This commit is contained in:
parent
839db5491d
commit
c3cda0bff2
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user