YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

Request to get the Safe Area / Cutout on Devices #4297

Open iampremo opened 1 year ago

iampremo commented 1 year ago

Ticket #209370

Feature Type: feat_addition_ingame Description: I would like to request a feature set to get the Safe Area for drawing on devices, mostly Mobile/Tablet, but Computers would work as well. This will provide us with the information we need in order to make sure that important UI/Buttons/Game Elements stay well within the screen and does not get pushed outside of the viewing boundary.

I've seen this implemented with AGK and the way they did it was have 8 functions related to getting the Safe area for drawing plus functions for getting the cutout. So maybe something similar here?

GetDisplayCutoutBottom GetDisplayCutoutLeft GetDisplayCutoutRight GetDisplayCutoutTop GetScreenBoundsSafeBottom GetScreenBoundsSafeLeft GetScreenBoundsSafeRight GetScreenBoundsSafeTop If it can also scale with resolution sizes that would be a plus.

Benefit: It's not just for me but for anyone who is trying to Develop mobile/tablet games with this tool. I mean we've had 6 years of devices that have had notch/camera holes right at the top of the screen which doesn't help and we need something native in GameMaker that we can call functions to get where we can place our UI/Buttons/Game Elements. This helps everyone to make their games feel and look more professional if we can get something to help deal with this. I think everyone would greatly appreciate this.

jackerley commented 1 month ago

NB: There is an extension on the marketplace which provides pretty much exactly this functionality https://marketplace.gamemaker.io/assets/9034/notch-mobile