Guys,
In "button.lua" (in Gideros' included "Button" template):
the MOUSE function contains "hitTestPoint" (and "updateVisualState")
function Button:onMouseDown(event)
if self:hitTestPoint(event.x, event.y) then
self.focus = true
self:updateVisualState(true)
event:stopPropagation()
end
end |
but the TOUCH function doesn't.
function Button:onTouchesBegin(event)
if self.focus then
event:stopPropagation()
end
end |
Why is that?
I was going to use "onMouseDown" in my app, but maybe I should use "onTouchesBegin" instead - it seems to require less typing!
Kate's Catalogue of Travelling Theatre Centres :Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Comments
Touch events require same hit test point as mouse events. Actually even little more typing as they have touch table:
Thanks, mate.
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.