mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
Fixed an issue with certain event callbacks
This commit is contained in:
parent
5fe9cdb806
commit
846f7cb60f
@ -280,9 +280,6 @@ function loveframes.debug.ExamplesMenu()
|
|||||||
list1:AddColumn("Column 2")
|
list1:AddColumn("Column 2")
|
||||||
list1:AddColumn("Column 3")
|
list1:AddColumn("Column 3")
|
||||||
list1:AddColumn("Column 4")
|
list1:AddColumn("Column 4")
|
||||||
list1.OnRowClicked = function(parent, row, rowdata)
|
|
||||||
print(unpack(rowdata))
|
|
||||||
end
|
|
||||||
|
|
||||||
for i=1, 20 do
|
for i=1, 20 do
|
||||||
list1:AddRow("Row " ..i.. ", column 1", "Row " ..i.. ", column 2", "Row " ..i.. ", column 3", "Row " ..i.. ", column 4")
|
list1:AddRow("Row " ..i.. ", column 1", "Row " ..i.. ", column 2", "Row " ..i.. ", column 3", "Row " ..i.. ", column 4")
|
||||||
|
@ -120,7 +120,9 @@ function button:mousereleased(x, y, button)
|
|||||||
|
|
||||||
if hover == true and down == true and button == "l" and clickable == true then
|
if hover == true and down == true and button == "l" and clickable == true then
|
||||||
if enabled == true then
|
if enabled == true then
|
||||||
self.OnClick(self, x, y)
|
if self.OnClick then
|
||||||
|
self.OnClick(self, x, y)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -75,6 +75,15 @@ function columnlistrow:draw()
|
|||||||
skin.DrawColumnListRow(self)
|
skin.DrawColumnListRow(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local cwidth, cheight = self:GetParent():GetParent():GetColumnSize()
|
||||||
|
local x = 5
|
||||||
|
|
||||||
|
for k, v in ipairs(self.columndata) do
|
||||||
|
local height = self.font:getHeight("a")
|
||||||
|
love.graphics.print(v, self.x + x, self.y + self.height/2 - height/2)
|
||||||
|
x = x + cwidth
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[---------------------------------------------------------
|
--[[---------------------------------------------------------
|
||||||
|
@ -71,7 +71,9 @@ function sliderbutton:update(dt)
|
|||||||
|
|
||||||
if nvalue ~= pvalue then
|
if nvalue ~= pvalue then
|
||||||
self.parent.value = loveframes.util.Round(nvalue, self.parent.decimals)
|
self.parent.value = loveframes.util.Round(nvalue, self.parent.decimals)
|
||||||
self.parent.OnValueChanged(self.parent, self.parent.value)
|
if self.parent.OnValueChanged then
|
||||||
|
self.parent.OnValueChanged(self.parent, self.parent.value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.Update then
|
if self.Update then
|
||||||
|
@ -1166,15 +1166,6 @@ function skin.DrawColumnListRow(object)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cwidth, cheight = self:GetParent():GetParent():GetColumnSize()
|
|
||||||
local x = 5
|
|
||||||
|
|
||||||
for k, v in ipairs(self.columndata) do
|
|
||||||
local height = self.font:getHeight("a")
|
|
||||||
love.graphics.print(v, self.x + x, self.y + self.height/2 - height/2)
|
|
||||||
x = x + cwidth
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- register the skin
|
-- register the skin
|
||||||
|
Loading…
Reference in New Issue
Block a user