flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
286 stars 25 forks source link

Support moving main menu bar slightly #162

Closed akkartik closed 10 months ago

akkartik commented 10 months ago

The problem: on iOS the default position of the main menu bar is overlapped by the iOS menu bar (time and so on).

So we found it useful to move the main menu bar slightly on iOS.

Please feel free to ignore this PR. I just wanted to share our changes back in case they're useful to you.

flamendless commented 10 months ago

Thanks for the PR!

Instead of setting x and y, i think it's better to check for the OS version (using love.system.getOS()) and if it's mobile, we can use https://love2d.org/wiki/love.window.getSafeArea

akkartik commented 10 months ago

Oh great idea. How's this?

flamendless commented 10 months ago

Awesome! Thank you!