This commit is contained in:
qfx 2020-02-21 19:42:13 +02:00
parent 82508d9e3a
commit 0d442fc29b
6 changed files with 7 additions and 7 deletions

0
LICENSE Executable file → Normal file
View File

12
core/element.lua Executable file → Normal file
View File

@ -218,8 +218,8 @@ function element:setup()
__newindex = function(t, index, val)
if self.baseState[index] ~= val then
self.baseState[index] = val
if self.element.baseState.onUpdate then
self.element.baseState.onUpdate()
if self.baseState.onUpdate then
self.baseState.onUpdate()
end
self.context:bubbleUpdate()
end
@ -340,8 +340,8 @@ function element:draw(x, y)
end
if self.settings.firstDraw then
if self.element.baseState.onFirstDraw then
self.element.baseState.onFirstDraw()
if self.baseState.onFirstDraw then
self.baseState.onFirstDraw()
end
self.settings.firstDraw = false
end
@ -360,8 +360,8 @@ function element:draw(x, y)
end
function element:undraw()
if self.element.baseState.onDestroy then
self.element.baseState.onDestroy()
if self.baseState.onDestroy then
self.baseState.onDestroy()
end
self.settings.remove = true
self.settings.firstDraw = true

2
core/input.lua Executable file → Normal file
View File

@ -474,7 +474,7 @@ function input.eventHandlers.mousemoved(x, y, dx, dy)
local succ = sub:checkInside(x, y)
if sub.active and not sub.currentEvent and succ then
sub.cleanUp = sub:emit(x, y) or dummyfunc
sub.cleanUp = sub:emit(x, y, dx, dy) or dummyfunc
sub.currentEvent = true
captured = true
elseif sub.currentEvent and not succ then

0
dummy.lua Executable file → Normal file
View File

0
init.lua Executable file → Normal file
View File

0
utils.lua Executable file → Normal file
View File