mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
fixed bug with love.mousemoved
This commit is contained in:
parent
a541640cfe
commit
2a74d356dc
@ -197,7 +197,7 @@ do
|
||||
if mousemoved_event then
|
||||
self.head.mousemoved = function(self, x, y, dx, dy)
|
||||
if self.selected then
|
||||
self.parent:move(y, dx)
|
||||
self.parent:move(dx, dy)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
@ -126,7 +126,7 @@ pop.draw = function(element)
|
||||
end
|
||||
end
|
||||
end
|
||||
pop.mousemoved = function(self, x, y, dx, dy)
|
||||
pop.mousemoved = function(x, y, dx, dy)
|
||||
if pop.focused and pop.focused.mousemoved then
|
||||
return pop.focused:mousemoved(x, y, dx, dy)
|
||||
end
|
||||
|
@ -197,7 +197,7 @@ do
|
||||
if mousemoved_event then
|
||||
self.head.mousemoved = function(self, x, y, dx, dy)
|
||||
if self.selected then
|
||||
self.parent:move(y, dx)
|
||||
self.parent:move(dx, dy)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
@ -126,7 +126,7 @@ pop.draw = function(element)
|
||||
end
|
||||
end
|
||||
end
|
||||
pop.mousemoved = function(self, x, y, dx, dy)
|
||||
pop.mousemoved = function(x, y, dx, dy)
|
||||
if pop.focused and pop.focused.mousemoved then
|
||||
return pop.focused:mousemoved(x, y, dx, dy)
|
||||
end
|
||||
|
@ -53,8 +53,7 @@ class window extends element
|
||||
if mousemoved_event
|
||||
@head.mousemoved = (x, y, dx, dy) =>
|
||||
if @selected
|
||||
-- for some reason, y and dx are actually dx and dy...what the fuck? (note: in version 0.10.0 AND 0.10.1)
|
||||
@parent\move y, dx --dx, dy
|
||||
@parent\move dx, dy
|
||||
return true
|
||||
return false
|
||||
|
||||
|
@ -102,7 +102,7 @@ pop.draw = (element=pop.screen) ->
|
||||
for i = 1, #element.child
|
||||
pop.draw element.child[i]
|
||||
|
||||
pop.mousemoved = (x, y, dx, dy) =>
|
||||
pop.mousemoved = (x, y, dx, dy) ->
|
||||
if pop.focused and pop.focused.mousemoved
|
||||
return pop.focused\mousemoved x, y, dx, dy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user