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
|
if mousemoved_event then
|
||||||
self.head.mousemoved = function(self, x, y, dx, dy)
|
self.head.mousemoved = function(self, x, y, dx, dy)
|
||||||
if self.selected then
|
if self.selected then
|
||||||
self.parent:move(y, dx)
|
self.parent:move(dx, dy)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -126,7 +126,7 @@ pop.draw = function(element)
|
|||||||
end
|
end
|
||||||
end
|
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
|
if pop.focused and pop.focused.mousemoved then
|
||||||
return pop.focused:mousemoved(x, y, dx, dy)
|
return pop.focused:mousemoved(x, y, dx, dy)
|
||||||
end
|
end
|
||||||
|
@ -197,7 +197,7 @@ do
|
|||||||
if mousemoved_event then
|
if mousemoved_event then
|
||||||
self.head.mousemoved = function(self, x, y, dx, dy)
|
self.head.mousemoved = function(self, x, y, dx, dy)
|
||||||
if self.selected then
|
if self.selected then
|
||||||
self.parent:move(y, dx)
|
self.parent:move(dx, dy)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -126,7 +126,7 @@ pop.draw = function(element)
|
|||||||
end
|
end
|
||||||
end
|
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
|
if pop.focused and pop.focused.mousemoved then
|
||||||
return pop.focused:mousemoved(x, y, dx, dy)
|
return pop.focused:mousemoved(x, y, dx, dy)
|
||||||
end
|
end
|
||||||
|
@ -53,8 +53,7 @@ class window extends element
|
|||||||
if mousemoved_event
|
if mousemoved_event
|
||||||
@head.mousemoved = (x, y, dx, dy) =>
|
@head.mousemoved = (x, y, dx, dy) =>
|
||||||
if @selected
|
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 dx, dy
|
||||||
@parent\move y, dx --dx, dy
|
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ pop.draw = (element=pop.screen) ->
|
|||||||
for i = 1, #element.child
|
for i = 1, #element.child
|
||||||
pop.draw element.child[i]
|
pop.draw element.child[i]
|
||||||
|
|
||||||
pop.mousemoved = (x, y, dx, dy) =>
|
pop.mousemoved = (x, y, dx, dy) ->
|
||||||
if pop.focused and pop.focused.mousemoved
|
if pop.focused and pop.focused.mousemoved
|
||||||
return pop.focused\mousemoved x, y, dx, dy
|
return pop.focused\mousemoved x, y, dx, dy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user