First, even if you gonna recommend such libraries, then better off this
https://github.com/Vovkiv/resolution_solution (*wink-wink*) or something else from here
https://github.com/love2d-community/awe ... 2d#drawing
Second, it's not gonna work here, probably.
If you scale UI sprite in non-integer way, they gonna look bad. And if you gonna scale up fonts... don't.
It's better off to draw UI element's with some primitives or some kind of SVG implementation (which practically same thing here) and update then once user changed size or window size changed. And redraw fonts also according to this. If you scale up Tahoma 14 with x2, it doesn't become Tahoma 14, it become stretched as f Tahoma 14, so redraw it in 28.
As ivan mentioned, here might be some issues, including layout (if you scale UI, some elements might overlap and you don't want it to happens), making sure that UI is always crisp.
I think most biggest problem here is math and how you want to handle UI.
For example:
Code: Select all
love.graphics.rectangle("fill", 10, 10, (love.graphics.getWidth() * 0.10) * ui_global_scale, (love.graphics.getHeight() * 0.05) * ui_global_scale)
In this case, we got rectangle that will take 10% of screen by width, 5% by height and it's draw on 10, 10, and also multiplied by global UI scale value. Re-draw it once you need to. Make some overlap logic (for example, if this rectangle overlaps another one, you might want to place it in different place), design it against different resolutions/layouts, add scaling for fonts (if any) based on screen size and global scaling value and I think you should be good.
PS: Even if you use some scaling library, like mine, I think it's still gonna be good idea to render UI independent of game scaling. I can tolerate game not being rendered crispy due to scaling, but not UI.