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 / [SOLVED] [BUG] Banner ads do not touch the bottom of the screen if GetScreenBoundsBottom() is higher than 100%

Author
Message
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 19th Feb 2020 08:16 Edited at: 19th Feb 2020 08:35
If GetScreenBoundsBottom() is greater than 100% (using the percentage system) can we have the banner placement corrected so that it touches the bottom of the screen please? At the moment it's floating a little higher up and doesn't really stand out as well as it did if it was right at the bottom. It can often clash with the app background, depending on the ad shown.

One of the ways GetScreenBoundsBottom() is greater than 100% is when you use SetImmersiveMode(1)

Also, can we have a function like GetBannerAdIsShown() please? The name isn't important, but knowing if one has loaded and is shown would be really useful
OryUI - A WIP AGK2 UI Framework

The author of this post has marked a post as an answer.

Go to answer

Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 19th Feb 2020 09:22
This post has been marked by the post author as the answer.
I had a similar issue and after you SetImmersiveMode(1) then you have to wait a second then set your virtual resolution to 100,100. This then allows you to use full screen and the add should also locate itself properly. This is because the device resolution actually changes after you go into immersive mode. SetDisplayAspect(-1) also does the same thing allowing the full screen to be used for the game graphics/ads. It has to be done after you set immersive mode and after the interface bar has moved off-screen though..
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 19th Feb 2020 10:06 Edited at: 19th Feb 2020 10:15
Thanks, but how do you know if the device bar is on the screen, and when it has just disappeared?

EDIT: maybe storing the getscreenboundstop value each frame and on the next frame check if its changed since the last would tell me that the screen has changed with the bottom menu appearing etc.?
OryUI - A WIP AGK2 UI Framework
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 19th Feb 2020 10:22
At the moment I have SetImmersiveMode(1) in the main do loop happening each cycle. Adding SetDisplayAspect(-1) underneath it fixed the ads problem by putting it at the bottom so thank you @Bengismo. Calling those two functions each cycle might be overkill and might cause some lag, so I'll look at seeing if I can only call them when the screen height changes
OryUI - A WIP AGK2 UI Framework

Login to post a reply

Server time is: 2024-11-22 11:26:33
Your offset time is: 2024-11-22 11:26:33