Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Mouse and Touch Events with Scaling — Gideros Forum

Mouse and Touch Events with Scaling

MillerszoneMillerszone Member
edited October 2011 in General questions
I thought Mouse and Touch Events worked with @2x scaling, but I never tested.
So, here is another scaling feature that needs to be fixed. Hopefully that covered all of the scaling.

Also, I haven't tested, but when the orientation of the screen changes, will the Mouse and Touch Events
also change?

Thanks.

Comments

  • atilimatilim Maintainer
    Hi,

    I've done a simple test with image scaling + mouse/touch events and I cannot produce the bug. (I may not understand the bug :) ) Can you explain a little bit more?

    Here is my simple test app for testing: http://dl.dropbox.com/u/684866/scaling.zip
    Here, hitTestPoint should run correctly and you should see the mouse coordinates between [0, 100] independent of the resolution.

    With the orientation changes, mouse/touch coordinates are also transformed according to the orientation.

    Thank you for your valuable feedback.
  • Great, your example works when scaling and when orientation changes.

    For some reason my code touches work when in iPhone mode but not iPad mode (@2x).
    Ill check today.

    Thank you.
  • O.k., early today when I tested your scale example, I didn't test in landscape mode.
    So I just tested in landscape mode and touches didn't work when in the @2x mode(200x200).
    I'm testing with the Gideros Player on an iPad 2, no orientation code.

    It seems the problem is with the Orientation option in "Project Properties". If I use Portrait
    or Portrait Upside Down, touches work, but if I use Landscape Left or Landscape Right
    touches do not work in @2x mode. I even tried different Scale Modes and Logical Dimensions,
    but still didn't work.

    I noticed the Player Hardware Resolutions options list all Portrait dimensions, don't know if that
    has anything to do with it.

    Also, if my apps orientation is Landscape, should the Logical Dimensions in the "Project Properties"
    be 480x320 or keep it at 320x480?
  • atilimatilim Maintainer
    Yes, there is definitely a bug here. Touch/mouse coordinates are not transformed correctly. Thank you catching and sorry for the trouble. We'll release a 2011.9.1.beta as soon as possible.

    As you guess, you should always select 320x480. This may have some confusion, but you can think that logical coordinates are reinterpretation of real device coordinates independent of orientation.

    Thank you again
Sign In or Register to comment.