omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Scene Orientation Lock

    Pythonista
    2
    3
    998
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RocketBlaster05
      RocketBlaster05 last edited by

      Hello! My app I am creating is meant to be played solely in portrait mode. I wish for the app to be played only in portrait mode as when it flips to landscape mode some issues occur. I use a combination of scenes and ui.views. I found a thread for the ui.Views but I am more concerned about scenes remaining in portrait mode, as my minigames within the app run on a scene and are the main thing I do not want to rotate to landscape. If there is any way to lock the scene orientation I would be grateful if anyone could share it.

      Thanks!

      mikael 1 Reply Last reply Reply Quote 0
      • mikael
        mikael @RocketBlaster05 last edited by

        @RocketBlaster05, from the docs:

        scene.run(scene, orientation=DEFAULT_ORIENTATION, frame_interval=1, anti_alias=False, show_fps=False, multi_touch=True)

        Runs the given Scene object. By default, the scene runs in the current device orientation, set the parameter to PORTRAIT or LANDSCAPE to force a specific orientation (and to disallow auto-rotation). Important: The orientation parameter has no effect on iPads starting with iOS 10 because it is technically not possible to lock the orientation in an app that supports split-screen multitasking.

        RocketBlaster05 1 Reply Last reply Reply Quote 0
        • RocketBlaster05
          RocketBlaster05 @mikael last edited by

          @mikael ah ok. I will still put the code in for phones but yes I am working on my iPad so I guess I’ll have to assume it works. Thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors