Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 2
Registered: ‎12-11-2012
My Device: Dev Alpha B
My Carrier: Airplane

Recreating application window

I'm working on porting my game engine over to BB10 and I noticed that if I recreate the application window, it goes behind the UI (I can see my game running if I restart the device for example). I tried changing the ZORDER and specifically making it VISIBLE, but so far nothing.

 

I'm guessing maybe the application window is automatically added to some group after creation, but I have no idea. :3

 

I've considered creating a dummy application window and using a child window as my app window to workaround this issue, but I would much rather stick with just a single window.

 

Anyway, ideas welcome!

G

gamaral
BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Recreating application window

is your UI in a child window?

I think destroying and recreating the parent (application) window is probably a bad thing, and navigator will probably get angry Smiley Happy

I would suggest that you consider making all of your dynamic windows be children of the main application window.  You can even create that main window with 0 buffers if you want to save on memory, not have to deal with posting, etc.

 

Cheers,

Sean

New Contributor
Posts: 2
Registered: ‎12-11-2012
My Device: Dev Alpha B
My Carrier: Airplane

Re: Recreating application window

Well I found a way to worked around the issue, I keep the app window, and I just reset most of the internals, that worked perfectly.

 

If anybody is interested:

 

https://github.com/gamaral/marshmallow_h/blob/master/src/graphics/opengl/viewport-qnx.cpp

gamaral