# devlog-together

Kartik Agaram

12/17/2023, 6:33 PM
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 inside 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
callback that continually refresh the backing value as you drag the slider.