make widgets identical to their data definitions

This commit is contained in:
airstruck
2015-10-30 05:38:46 -04:00
parent 1c491335f5
commit 62ca5bf50a
7 changed files with 47 additions and 54 deletions

View File

@@ -52,7 +52,7 @@ function Layout:show ()
love.window.setTitle(title)
end
self:manageInput(self.input)
root:reflow()
root:reshape()
end
function Layout:hide ()
@@ -141,9 +141,9 @@ function Layout:manageInput (input)
end)
self:hook('mousemoved', function (x, y, dx, dy)
if self.isMousePressed then
return input:handlePressedMotion(x, y)
return input:handlePressedMove(x, y)
else
return input:handleMotion(x, y)
return input:handleMove(x, y)
end
end)
self:hook('keypressed', function (key, isRepeat)