LazyGUI - a GUI library for easy iteration

Check out this GUI library I made, it aims to tighten the iteration loop even more than previously thought possible and I’d love to hear your thoughts on it before I submit it to the processing foundation as a potentially official library…

Find the readme, source and jar on github:
https://github.com/KrabCode/LazyGui

5 Likes

…and what is so easy about it…?

2 Likes

You don’t need to declare control elements in setup() or keep track of any objects - you just query what values you need in draw() using a unique path and they get lazily initialized the first time you do it. Way easier to change things when it’s all together in the draw() function.

Also your GUI values can get autosaved when closing the sketch so you can jump right back to where you were when you just want to edit a piece of the code and re-run it.

1 Like

Impressive.

Thanks a lot!

1 Like

Very handy lib.
It’s now an essential tool in my everyday’s workflow.
Thanks

3 Likes

@krab This is great.
I keep getting this error in one of my sketches tho
“ClassCastException: class processing.awt.PSurfaceAWT$SmoothCanvas cannot be cast to class com.jogamp.newt.opengl.GLWindow (processing.awt.PSurfaceAWT$SmoothCanvas and com.jogamp.newt.opengl.GLWindow are in unnamed module of loader ‘app’)”

That’s interesting, I don’t get that at all - could you share some minimal sketch code so that I could reproduce it? What OS are you on? Also consider joining the discord, link at the bottom of the readme, for easier troubleshooting chats.

1 Like

Sketch must be P2D.

Thanks, this worked!!

The GUI should have printed a warning before the exception though. I don’t know if you saw that. Anyway, we’re moving the warning into a full exception in 1.0.1 so it’s more obvious and you don’t see this confusing error at all.

1 Like

This is not entirely accurate - the sketch can be P3D too. It just can’t use the default renderer.