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 / Scissors Width Question

Author
Message
haliop_New
User Banned
Posted: 29th Jul 2015 09:50
so.. im using SetScissors(0,0,0,0)
and theres always 2 black borders
so if the virtual resolution
is set to lets say a full hd 1920x1080
and i'll create a simple white sprite with the size of 1920x1080
i will always see 2 black borders aside it ...

how can i know how much bigger the sprite should be if i want it to cover the entire screen ?

thank you for your time.
haliop.
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 29th Jul 2015 10:10
You can get the 'true' width and height of the screen using the GetScreenBoundsLeft(), -Right(), -Top() and -Bottom() commands. I use this to position UI-elements if the user's resolution makes borders on the screen.
haliop_New
User Banned
Posted: 29th Jul 2015 14:50
Thank you Thank you Thank YOU!!!
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 29th Jul 2015 16:01 Edited at: 29th Jul 2015 16:02
You're welcome!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th Oct 2015 22:52
Since the ratio of the dimensions of actual devices is not always the same as what your game is built for (assuming virtual resolution), it helps to build background images large enough to cover the largest ratio in both dimensions. Set them to the center of your virtual resolution and they should cover the black bars.
Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-11-16 22:08:44
Your offset time is: 2024-11-16 22:08:44