Very cool new feature: JUCE_LIVE_CONSTANT


#1

Just a quick announcement of a simple-but-cool new feature I just added..

I found myself needing to tweak a few constants in tracktion to get the UI looking right - simple stuff like colours, sizes, etc. and suddenly had an idea for a neat trick to make the process much easier!

You can have a read of the docs here, but the gist is when you can wrap this macro around a primitive constant in your code (most likely in a paint() or resized() method, but it'll work anywhere), it uses extreme cunningness to pop up a window that'll let you tweak that value in real-time, and will show you what the updated value will look like in the original source code.

I was really chuffed with this! It only took a few hours to write, but should be super-handy for all kinds of stuff. It's not quite finished: I still need to make it able to automatically re-save the changed values into your source file, and I should add an example to the demo app showing how to use it. But I'll be using it myself, so will fine-tune and improve it as I go along.

Hope it proves useful to other people too!