fullscreenmode and rect of a substack on mobile device ?

Ludovic THEBAULT ludovic.thebault at laposte.net
Tue Aug 21 15:11:05 EDT 2018


> Le 20 août 2018 à 22:36, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> a écrit :
> 
> On 8/19/18 11:11 PM, Ludovic THEBAULT via use-livecode wrote:
>> But i found i can get the « real » top and bottom with : round((item 4 of the screenrect*the systemscale)/2)-theight // +theight (for the bottom)
>> where theight is the height of my stack before fullscreenmode.
> 
> You should be able to get the stack rect from "the rect of this card", or "the rect of this stack". That may have been lost in the long conversation that followed your question.
> 
> The card rect will tell you the width and height, the stack rect will tell you the pixel locations of the top, sides, and bottom. Does that work for you? Brian observed that the actual mobile size isn't defined yet on preOpenCard (I haven't tested that) so you may need to query it after the app has fully loaded.
> 

Hello, thanks

But even « the rect of this cd » return the rect of the stack i created (0,0,768,1024) not the rect of the screen.
I’ve made a test stack. It’s an « iPad » stack. Test it with iOS simulator on an iPhone device.
https://www.dropbox.com/s/iwwm2syiqzqamtg/testsubstack2.livecode?dl=0

Click on « get the rect » and click on « Adapt » to set the rect of the background to the rect of the screen



More information about the use-livecode mailing list