flamendless / Slab

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

Fix Input args validation and use simpler form #78

Closed idbrii closed 3 years ago

idbrii commented 3 years ago

The error checking uses the construction x == nil and valid_when_nil or x. But that fails when valid_when_nil evaluates to false. Using the simpler construction x or valid_when_nil with care around booleans would make it easier to see what validation is being done.

Simplifying fixes these args that were nil, but should be boolean.

Options.ReadOnly Options.MultiLine Options.NoDrag Options.UseSlider