mirror of
https://github.com/airstruck/luigi.git
synced 2026-01-10 16:28:23 +00:00
fix some mouse button stuff
This commit is contained in:
@@ -72,7 +72,7 @@ end
|
|||||||
|
|
||||||
function Input:handlePressedMotion (x, y)
|
function Input:handlePressedMotion (x, y)
|
||||||
local widget = self.layout:getWidgetAt(x, y)
|
local widget = self.layout:getWidgetAt(x, y)
|
||||||
for button = 0, 2 do
|
for button = 1, 3 do
|
||||||
local originWidget = self.pressedWidgets[button]
|
local originWidget = self.pressedWidgets[button]
|
||||||
local passedWidget = self.passedWidgets[button]
|
local passedWidget = self.passedWidgets[button]
|
||||||
if originWidget then
|
if originWidget then
|
||||||
@@ -124,7 +124,7 @@ function Input:handlePressStart (button, x, y)
|
|||||||
self.passedWidgets[button] = widget
|
self.passedWidgets[button] = widget
|
||||||
self:bubbleEvent('PressStart', widget, {
|
self:bubbleEvent('PressStart', widget, {
|
||||||
target = widget,
|
target = widget,
|
||||||
buton = button, x = x, y = y
|
button = button, x = x, y = y
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -137,12 +137,12 @@ function Input:handlePressEnd (button, x, y)
|
|||||||
self:bubbleEvent('PressEnd', widget, {
|
self:bubbleEvent('PressEnd', widget, {
|
||||||
target = widget,
|
target = widget,
|
||||||
origin = originWidget,
|
origin = originWidget,
|
||||||
buton = button, x = x, y = y
|
button = button, x = x, y = y
|
||||||
})
|
})
|
||||||
if (widget == originWidget) then
|
if (widget == originWidget) then
|
||||||
self:bubbleEvent('Press', widget, {
|
self:bubbleEvent('Press', widget, {
|
||||||
target = widget,
|
target = widget,
|
||||||
buton = button, x = x, y = y
|
button = button, x = x, y = y
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
self.pressedWidgets[button] = nil
|
self.pressedWidgets[button] = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user