• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Admob banner not showing in right place

F

Farouk

Guest
Hi
i cannot find an explanation to that weird problem anywhere

If i used the command

display_set_gui_size(global.ideal_width,global.ideal_height)

where ideal height and width are the size of the room, view and application surface

ADmob ads appear near the middle of the screen even though i am using display_get_gui_hieght
to display it at the bottom of the screen

as soon as i comment the line that resizes the Gui ads show in the proper place!


how can this problem be happening given i am trying to make the gui layer same size as my room , my view and application surface?

even when i use (room_height-100) to display the ads near the bottom they still show up near the middle as long as this line is not commented!

any explanation?


that's the code am using

room_width= global.ideal_width;
room_height= global.ideal_height;
surface_resize(application_surface,global.ideal_width,global.ideal_height);
display_set_gui_size(global.ideal_width,global.ideal_height);

and that's the code for the ads

bh = GoogleMobileAds_BannerGetHeight();
py = display_get_gui_height() -bh; // even when using room_height it doesn't show right
GoogleMobileAds_AddBannerAt("ca-app-pub-number", GoogleMobileAds_Smart_Banner, 0,py);
 
F

Farouk

Guest
Hi, no it's not solved, i was wrong

i wanted to ask the question in a clearer way this time

i will try to delete the other thread if possible
 
Top