Centering sub-app regardless of screensize.
I've made a pause menu for my game that's just like Mario's. You press enter and a small rectangular pause menu opens in the center of the screen: (Screen size windowed is 256x224, sub-app size is 147x90)
+User presses enter
-Create sub-app at (55,68)
But, we all know sub-apps don't resize with the main-app, so, for fullscreen, I used window control and global values to resize the sub-app (735,445) and place it accordingly:
+User presses enter
+Fullscreen=1
-Create sub-app at (280,300)
SO NOW...the pause menu is positioned correctly on my monitor, but not on certain other monitors, or widescreen monitors. I think it's a simple fix (Set X,Y position to blah blah of Screen W/H...?)but I don't know the expression.
Re: Centering sub-app regardless of screensize.
Hmm...
Set X pos to: Screen Width/2.0-Sub-app Width/2.0
to get it center in comparison to the screen I think. Same thing with Y just change Width to height? Forgive me if I'm wrong...
Oh and use the Window Control object to get the screen width and height...