Outside Letterbox Scale No Click Event

When trying to touch a button event thats outside of the letterbox scaled area, the events are unresponsive.

The following is a screenshot from the iphone, my config is set to width = 320, height = 480 so the letterbox scale fits properly, and all touch events work as should

The next image is from an android with a wider screen, in the image i added a red transparent layer where the letterbox scaling goes outside the set position.

The left red area does respond as should. Im assuming since the touch events must start from 0x0. But the right red area has no touch response. And this i assume since the touch event stops at the letterbox width.

You can see that apart of the right red layer cuts through the button. This is the exact line between the button receiving events and nothing happening.

A little help please… [import]uid: 50514 topic_id: 19894 reply_id: 319894[/import]

Your problem is most likely related to the coordinates you are using. You should try using coordinates that are higher than 480 for that right red area and see if your problem persists.

-Matt
W2MD [import]uid: 10211 topic_id: 19894 reply_id: 77349[/import]

Im not sure if i fully understood that. Are you referring to the config.lua or the code that displays the screenshot i gave?

I tried creating a random image on top of all other objects and printing text if its click event was registered. Once i positioned the image into the right red area, all touch events stopped registering.

Is this along the lines what you described i should try?

Is it possible this is a bug in corona? [import]uid: 50514 topic_id: 19894 reply_id: 77503[/import]

@caras: are you using the director class? [import]uid: 90610 topic_id: 19894 reply_id: 77509[/import]

yes i am… damn is that what the problem is!?

if so do you know how i can fix it?? [import]uid: 50514 topic_id: 19894 reply_id: 77511[/import]

yups, I guess so.

read here:

https://developer.anscamobile.com/forum/2011/10/28/touch-not-working-fully-android

cheers [import]uid: 90610 topic_id: 19894 reply_id: 77512[/import]

Ahh! perfect! Thanks a lot.

To any one else having this issue, in the director class replace

[lua]local _W = display.contentWidth
local _H = display.contentHeight[/lua]

with

[lua]local _W = (math.ceil(math.abs(display.screenOriginX)) * 2) + display.contentWidth
local _H = (math.ceil(math.abs(display.screenOriginY)) * 2) + display.contentHeight[/lua] [import]uid: 50514 topic_id: 19894 reply_id: 77516[/import]

I didn’t realize it was a director issue, but YES I’ve dealt with that issue before and was going to suggest you adjust your screenwidth variables like caras said.

-Matt
W2MD [import]uid: 10211 topic_id: 19894 reply_id: 77598[/import]