Henrik
Member
|
|
10-31-2011 04:56 PM |
|
Esenthel
Administrator
|
RE: Simulator issues
D.scale
D.aspectDisplay
D.aspectMode
D.screen_changed
basically just readjust the D.scale on D.screen_changed call
|
|
10-31-2011 06:31 PM |
|
Salival
Member
|
RE: Simulator issues
We have tried to play with these features without any result.
We tried to scale:
D.scale( D.scale() * 1.5f );
We tried to change the D.aspectMode( ASPECT_Y );
But no differences, What could it be?
The picture is when we changed the scale of * 1.5, Now you can not see the text to the right, but everything else is the same.
(This post was last modified: 10-31-2011 08:13 PM by Salival.)
|
|
10-31-2011 08:12 PM |
|
Esenthel
Administrator
|
RE: Simulator issues
what is your full code for D.scale?
you need to set it differently in D.screen_changed depending on device rotation
|
|
10-31-2011 10:50 PM |
|
Salival
Member
|
RE: Simulator issues
First set the new func, Have tested a lot, but looks like it's only text to the right that resize, all the other 2D rendered stuff stays the same size.
Code:
void ScreenChanged( Flt old_width, Flt old_height )
{
// Tested all sort of scales.
D.scale(800 / (Flt)D.y());
}
InitPre - D.screen_changed = ScreenChanged;
We want to lock the IPad to work in landscape mode only (option in xcode) so we do not need a dynamic change in the scale, only a fixed scale, so then we can just call D.scale() in InitPre like normaly, but we can not make it look good on the iPad, works great on any Windows or Mac.
Any ideas?
(This post was last modified: 11-01-2011 08:31 AM by Salival.)
|
|
11-01-2011 08:28 AM |
|
Salival
Member
|
RE: Simulator issues
I can give you the full source if you like to try it out yourself. Should be nice to solve the issue.
(This post was last modified: 11-01-2011 12:49 PM by Salival.)
|
|
11-01-2011 12:47 PM |
|
Esenthel
Administrator
|
RE: Simulator issues
screen res on ipad is 1024x768
does D.x() and D.y() return 1024, 768 on your simulator?
locking to landscape is:
Double click on "*-Info.plist" file inside your project folder to edit:
UISupportedInterfaceOrientations = (you can remove any of these if you wish) UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
keep only:
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
also set in InitPre:
App.valid_orientations=DIRF_LEFT|DIRF_RIGHT;
with only landscape mode, set D.scale only once in InitPre
how are you drawing the 2d images? (with what Rect sizes / scales)
if Text changes its scale then D.scale works correctly, possibly you're using wrong calculation for size of drawing of 2d tiles.
|
|
11-01-2011 01:31 PM |
|
Esenthel
Administrator
|
RE: Simulator issues
please wait for next SDK
if in next SDK the issue will not be solved please check carefully correctness of *.plist settings
|
|
11-01-2011 09:43 PM |
|
Salival
Member
|
RE: Simulator issues
Alright :]
|
|
11-01-2011 10:37 PM |
|