mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Add tree.OnSelectNode event callback
This commit is contained in:
parent
53894a743c
commit
f0349fce02
@ -153,7 +153,11 @@ function newobject:mousepressed(x, y, button)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.hover and button == "l" then
|
if self.hover and button == "l" then
|
||||||
|
local onselectnode = self.tree.OnSelectNode
|
||||||
self.tree.selectednode = self
|
self.tree.selectednode = self
|
||||||
|
if onselectnode then
|
||||||
|
onselectnode(self.parent, self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -26,6 +26,7 @@ function newobject:initialize()
|
|||||||
self.hbar = false
|
self.hbar = false
|
||||||
self.internal = false
|
self.internal = false
|
||||||
self.selectednode = false
|
self.selectednode = false
|
||||||
|
self.OnSelectNode = nil
|
||||||
self.children = {}
|
self.children = {}
|
||||||
self.internals = {}
|
self.internals = {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user