flamendless / Slab

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

Scale feature #146

Closed pakeke-constructor closed 1 year ago

pakeke-constructor commented 1 year ago

Hi Flam, I've (finally) taken a shot at implementing the scaling feature as discussed in #141. It's not ideal; originally, I wanted to be able to add scaling in as an option to the args of Slab.BeginWindow, but that seemed impossible (without requiring a massive rewrite).

Currently, I've implemented two functions:

Slab.SetScale(scale)
-- and:
Slab.GetScale()

That sets a global scale value for Slab. (Doing it on a per-window basis seemed like a tonne of work, considering how the codebase is layed out.)

Have a play around with this, I'm happy to make any changes. Cheers