I’m about to write a subclass of LookAndFeel to support a PNG-based UI. Before reinventing this from scratch, I thought I’d check to see if anybody has an example project or code they would like to share.
I almost did it a while ago, but I changed my mind when I realized how hard it was to draw nice widgets.
Don’t have any code left I’m afraid, but its pretty straight forward. I used the binarybuilder to bake the images into a source file, then its just a matter of loading them up into image brushes and paint()-away.
Getting the input to reflect right on the visuals might be trickier. I didn’t get that far.
[quote=“Rock Hardbuns”]I almost did it a while ago, but I changed my mind when I realized how hard it was to draw nice widgets.
I’m gonna give Blender a shot.
I considered this for a while, but then i decided against it because of one simple factor: resizability.
The widgets are currently designed so that they can be pretty much any size. If you put PNGs into a LookAndFeel, you’re basically going to restrict the size of components. You could make this less problematic i guess by putting extra functions into your LookAndFeel class to apply sizes to components, so that you don’t have to remember them… but i like being able to choose appropriate sizes for each thing as and when i need them. In the end i decided against bothering, but it’s still a nice idea.