If I set a screen orientation D4D_ORIENT_LANDSCAPE
status = D4D_Init(&screen_splash);
D4D_SetOrientation(D4D_ORIENT_LANDSCAPE);
I see a full screen and all graphical objects on it.
But if I set D4D_ORIENT_PORTRAIT
status = D4D_Init(&screen_splash);
D4D_SetOrientation(D4D_ORIENT_PORTRAIT);
I see a half of the screen and graphical objects displayed wrong.
What should I do to fix it?
Hello Evgeny Erenburg,
Hope you are doing great.
This may be happening because you put the position values of the objects as absolute values instead of relative values.
if you change this values to relative ones the screen should always fit.the values you put in the objects put them out of the screen when you change it because the width of landscape is bigger than portrait. take as reference the width of your screen to position the objects. please send me the way you position your objects (D4D_DECLARE_GROUP_BOX_BEGIN) to give you a better answer.
Have a great day.
Jonathan
Hi Jonathan,
Thank you for the reply. I found the problem. It should be D4D_DECLARE_STD_PORTRAIT_SCREEN_BEGIN(screen_main, ScreenMain_) instead of D4D_DECLARE_STD_SCREEN_BEGIN(screen_main, ScreenMain_).
Regards.