Simple two file code produces erroneous data.
main.lua
1 2 3 4 5 6 7 8 | function onTouch(event) if event.phase == "ended" then print(event.x, event.y) end return true end Runtime:addEventListener("touch", onTouch) |
PS - It works fine on my phone... just not in Simulator.
Which device skin did you choose for the simulation (ie, Nexus One, Droid, etc)?
Tim
Hi Tim, Thanks for the response! Here is the results for each skin:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | -- Nexus One Copyright (C) 2009-2010 A n s c a , I n c . Version: 2.0.0 Build: 2011.288 7 5 2 990 590 394 236 10 -- Droid Copyright (C) 2009-2010 A n s c a , I n c . Version: 2.0.0 Build: 2011.288 17 6 7 1050 577 390 222 20 17 4 -- myTouch Copyright (C) 2009-2010 A n s c a , I n c . Version: 2.0.0 Build: 2011.288 11 5 5 888 585 393 260 22 -- Galaxy Tab Copyright (C) 2009-2010 A n s c a , I n c . Version: 2.0.0 Build: 2011.288 6 4 3 1010 596 396 229 12 |
I don't know if this falls in the same realm as this bug, but suppose I don't want display.contentWidth and display.contentHeight to change when I "rotate" the screen on the Windows Simulator. Even if I only support one type of orientation, when I rotate the phone in the Simulator, display.contentWidth and display.contentHeight changes. Hence on portrait, using the config file in this thread, reads: diplay.contentWidth = 400 and diplay.contentHeight = 600. However, it changes to diplay.contentWidth = 600 and diplay.contentHeight = 400 when in landscape mode even if I explicitly only support one orientation in build.settings (or use no build.settings at all).