Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / portrait shows borders

Author
Message
haliop_New
User Banned
Posted: 3rd Feb 2017 04:13 Edited at: 3rd Feb 2017 05:10
sorry for this double post but I have forgotten the solution once again :/
not too proud about it...

so portrait mode shows some borders up and down
print shows just after that
I want it to be full screened , how ?

thank you.

my screen code
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 3rd Feb 2017 07:54
What you are doing is correct. Print will always be slightly away from the edge of the screen if you have borders but you can position sprites in the black bordered area by determining the width and height of the display area using the GetScreenBounds commands.
AGK V2 user - Tier 1 (mostly)
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Feb 2017 08:48
Set the aspect ratio to the devicewidth / device height, rather than the hard coded 768x1024
haliop_New
User Banned
Posted: 3rd Feb 2017 10:38
thank you.
haliop_New
User Banned
Posted: 3rd Feb 2017 10:46
Setting
asp# = GetdeviceHeight()/GetDevicewidth()
dosent do well and borders still shows....
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Feb 2017 11:19 Edited at: 3rd Feb 2017 11:20
Is this for a mobile device? If so are you sure the device resolution is 768x1024?
Why don't you just do this? SetWindowSize( GetDeviceWidth(), GetDeviceHeight(), 1 ) to set the resolution to the devices resolution, then keep the virtual resolution at 768x1024?
Try loading an image which is 768x1024 into your app in the center of the screen, and see if it fills the full screen or leaves borders.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 3rd Feb 2017 11:36 Edited at: 3rd Feb 2017 11:49
Your asp# variable will always be 1.000 because you are dividing an integer by an integer.
This will fix your asp# variable:
(Bare in mind that width and height may well exchange places when you go into portrait mode)
My original comment will fix your other issue.
AGK V2 user - Tier 1 (mostly)
haliop_New
User Banned
Posted: 5th Feb 2017 11:48
thank you Scraggle.

Login to post a reply

Server time is: 2024-09-29 23:31:44
Your offset time is: 2024-09-29 23:31:44