Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Porting Portrait App - WinRT — Gideros Forum

Porting Portrait App - WinRT

kussakovkussakov Member
edited September 2015 in General questions
Hi guys,

Not even sure how to phrase my questions, but I will try...

We have 3 Portrait apps that we want to port for WinRT (phone and PC/tablets full screen, no desktop).

So we exported for WinRT, compiled them and ran them:
On windows phone they run in Portrait mode - look OK and all (like on Android and iOS phones and tablets).

On Windows computer they open in full screen (as they should since they are not desktop apps that run in a window).
But the computer screen is landscape and they run in Portrait mode as if it was a phone (you have to rotate your big desktop in order to play them :-).
We want to configure them to run in the middle of the landscape screen in portrait mode. Hope you understand what I mean...
We don't know how to configure them without big rewriting of the lua code.
If you don't understand what I am asking, because I can't explain stuff well you may look and some app store examples - there are many apps in the Windows store that run like that on phones and PCs. One Example: Inside Out Thought Bubbles.

The question: Is there a way to configure/export the app to run this way without big lua code rewriting?

Thanks

Vlad

Comments

  • john26john26 Maintainer
    Hi Vlad,

    Yes, I understand your question. At the moment your app is running "sideways" on the screen right? In Windows 8, it is possible to change the window size so that two metro apps can share the screen side by side with each occupying 1/3, 1/2 or 2/3 of the screen. In windows 10, you can fully resize metro apps. So the best solution might be for your app to occupy a smaller window which doesn't cover the whole screen and which is portrait. Then the user can open another window with the rest of the screen.

    I am currently adding code to support window resizing:

    https://github.com/gideros/gideros/commit/9c53c5fbff209af48f2592d0e192d1995f0c9429

    At the moment it works correctly when the user resizes the window by clicking "split left" or "split right" or using one of the gestures. I haven't yet implemented application:setWindowSize and currently not sure how to programmatically resize a WinRT window (does anyone know?)

    So in your case if the user does "split left/right" so the app occupies 1/2 or 1/3 then that is a portrait window and the app will automatically appear right way up. This will work correctly in the new release (2015.8.1) but not in the current one (2015.8)
  • Thanks for the explanation @john26!

    Yes. The app runs sideways.

    So, at the moment there is no way to make it run straight in the middle of the window unless the user splits the screen.

    In that case I have to make lua changes and project changes - basically make the app landscape with reversed window size and deal with the consequences in the code...

    By the way the player/desktop apps work correctly even if you do full screen, but I guess this is very different than running a metro app.

  • john26john26 Maintainer
    The desktop player works correctly in that the Window is full screen but the app occupies only a portion of it with blank area on the left and right. This may not be the best for users.

    Would you be happy for your app to run in a portrait shaped window, or do you really want it to be full screen with empty sides? The former might be better for users.

  • kussakovkussakov Member
    edited September 2015
    Portrait shape "metro window" is better of course (if supported).

    But since right now it is not - full screen with empty sides on metro app for PCs appears to be our only option.
    As I said I found a workaround to achieve this effect, that does not require much changes to the LUA code: Before I export for Windows PC WindRT I change the project settings to landscape and reverse the width and height settings. Our app code is written in such a way that this setup works without much code changes. When I post it to the windows store I will let you know so that you can take a look.

    For the rest - we will wait for the Gideros changes you described and windows 10...

    Thanks John!
Sign In or Register to comment.