TheGameCreators / AGK-Studio

3 stars 1 forks source link

AdMob banner ad does not anchor to the bottom of screen when GetScreenBoundsBottom() is greater than 100 #1080

Open KevinCrossDCL opened 1 year ago

KevinCrossDCL commented 1 year ago

When SetVirtualResolution is (100, 100) and GetScreenBoundsBottom() is greater than 100, AdMob banner ad will not anchor to the bottom of the screen. It anchors to y=100

I've attached a screenshot showing the banner not at the bottom of the screen. The large white box in the background is a sprite that's sized 100x100 and positioned 0x0 to show that the banner is anchored to y=100 and not y=GetScreenBoundsBottom().

Banner ads are now not an option for me!

This is the code:


SetVirtualResolution(100, 100)
SetWindowSize(432, 888, 0)
SetAdMobDetails("xxxxxxxxx")
SetAdMobTesting(1)
SetAdvertVisible(1)
CreateAdvert(0, 1, 2, 1)
RequestAdvertRefresh()```
KevinCrossDCL commented 1 year ago

Likewise when anchoring to the top. It's not the top.


SetVirtualResolution(100, 100)
SetWindowSize(432, 888, 0)
SetAdMobDetails("xxxxxxxxx")
SetAdMobTesting(1)
SetAdvertVisible(1)
CreateAdvert(0, 1, 0, 1)
RequestAdvertRefresh()```
KevinCrossDCL commented 1 year ago

And this is your vertical centre!


SetVirtualResolution(100, 100)
SetWindowSize(432, 888, 0)
SetAdMobDetails("xxxxxxxxx")
SetAdMobTesting(1)
SetAdvertVisible(1)
CreateAdvert(0, 1, 1, 1)
RequestAdvertRefresh()```
KevinCrossDCL commented 1 year ago

The only way to get this to appear at the bottom is to remove SetVirtualResolution(100, 100) and basically start again with resizing and repositioning everything.