GLBasic forum

Main forum => GLBasic - en => Topic started by: codegit on 2009-Aug-06

Title: iPhone landscape mode
Post by: codegit on 2009-Aug-06
Hi

Does anybody know how to switch the iPhone into lanscape mode with GLBASIC??? I suppose you could always rotate the graphics 90 degrees and then plot from the top right corner moving left and down (if this makes sense)
Title: Re: iPhone landscape mode
Post by: Kitty Hello on 2009-Aug-06
it will be built in one day.
So far do this:

Code (glbasic) Select

CREATESCREEN 0,0,480,320
USESCREEN 0

WHILE TRUE
   .. draw as if it was 480x320


   USESCREEN -1
   ROTOSPRITE 0, (320-480)/2, (480-320)/2, 90 // or 270 for other orientation
   SHOWSCREEN
WEND


You have to rotate the mouse coordinates, too.
Title: Re: iPhone landscape mode
Post by: codegit on 2009-Aug-06
Yes, this makes sense. Thanks  :good:

Quote from: Kitty Hello on 2009-Aug-06
it will be built in one day.
So far do this:

Code (glbasic) Select

CREATESCREEN 0,0,480,320
USESCREEN 0

WHILE TRUE
   .. draw as if it was 480x320


   USESCREEN -1
   ROTOSPRITE 0, (320-480)/2, (480-320)/2, 90 // or 270 for other orientation
   SHOWSCREEN
WEND


You have to rotate the mouse coordinates, too.