hotfix
This commit is contained in:
parent
82508d9e3a
commit
0d442fc29b
12
core/element.lua
Executable file → Normal file
12
core/element.lua
Executable file → Normal file
@ -218,8 +218,8 @@ function element:setup()
|
|||||||
__newindex = function(t, index, val)
|
__newindex = function(t, index, val)
|
||||||
if self.baseState[index] ~= val then
|
if self.baseState[index] ~= val then
|
||||||
self.baseState[index] = val
|
self.baseState[index] = val
|
||||||
if self.element.baseState.onUpdate then
|
if self.baseState.onUpdate then
|
||||||
self.element.baseState.onUpdate()
|
self.baseState.onUpdate()
|
||||||
end
|
end
|
||||||
self.context:bubbleUpdate()
|
self.context:bubbleUpdate()
|
||||||
end
|
end
|
||||||
@ -340,8 +340,8 @@ function element:draw(x, y)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.settings.firstDraw then
|
if self.settings.firstDraw then
|
||||||
if self.element.baseState.onFirstDraw then
|
if self.baseState.onFirstDraw then
|
||||||
self.element.baseState.onFirstDraw()
|
self.baseState.onFirstDraw()
|
||||||
end
|
end
|
||||||
self.settings.firstDraw = false
|
self.settings.firstDraw = false
|
||||||
end
|
end
|
||||||
@ -360,8 +360,8 @@ function element:draw(x, y)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function element:undraw()
|
function element:undraw()
|
||||||
if self.element.baseState.onDestroy then
|
if self.baseState.onDestroy then
|
||||||
self.element.baseState.onDestroy()
|
self.baseState.onDestroy()
|
||||||
end
|
end
|
||||||
self.settings.remove = true
|
self.settings.remove = true
|
||||||
self.settings.firstDraw = true
|
self.settings.firstDraw = true
|
||||||
|
|||||||
2
core/input.lua
Executable file → Normal file
2
core/input.lua
Executable file → Normal file
@ -474,7 +474,7 @@ function input.eventHandlers.mousemoved(x, y, dx, dy)
|
|||||||
local succ = sub:checkInside(x, y)
|
local succ = sub:checkInside(x, y)
|
||||||
|
|
||||||
if sub.active and not sub.currentEvent and succ then
|
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
|
sub.currentEvent = true
|
||||||
captured = true
|
captured = true
|
||||||
elseif sub.currentEvent and not succ then
|
elseif sub.currentEvent and not succ then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user