Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Device orientation event — Gideros Forum

Device orientation event

For my first ever Gideros game, which is yet unreleased, I wanted to allow both portrait and landscape orientation on iOS and Android. I never got it to work. Now, five years later is there a way to do this?
My Gideros games: www.totebo.com

Comments

  • hgy29hgy29 Maintainer
    You can listen for APPLICATION_RESIZE event
  • I tried it, but got no event fired:
    stage:addEventListener( Event.APPLICATION_RESIZE, self.onApplicationResize, self )
    It's on the Gideros player on Android. I have set the auto rotation flag to true in properties. Is there something else I need to do?
    My Gideros games: www.totebo.com
  • hgy29hgy29 Maintainer
    Looking at the code it looks like the event is fired for all platforms but android! I am fixing that.

    Likes: antix, Apollo14

    +1 -1 (+2 / -0 )Share on Facebook
  • Party time! Thanks @hgy29!!
    My Gideros games: www.totebo.com
  • Will this event also work in HTML5 when the window is resized?

    My Gideros games: www.totebo.com
  • hgy29hgy29 Maintainer
    yes

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • Don't forget to set the switch in the requires plugin for Android landscape and portrait.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
Sign In or Register to comment.