Dec 17, 2023
One nice reusable abstraction my LÖVE apps have all converged on is an immediate-mode button primitive. I draw all my buttons each frame along with all the callbacks they need, and a couple of framework-y lines of code in the mouse-press callback is all it takes to get them working. Last night I realized (while poking around in the LÖVE forums) that my hacky sliders in Lua Carousel's settings admit a similar abstraction (even better than the one there). The only additional complexity is it needs a couple more lines in the update callback that continually refresh the backing value as you drag the slider.
This post is part of my Freewheeling Apps Devlog.
Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.