Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Easy and gorgeous UI with SodaSpec!

edited June 2017 in Code Sharing Posts: 557

Hi all, I hope you'll enjoy SodaSpec!

It is basically just a convenience wrapper for @yojimbo2000's incredible SODA library. If you haven't seen that, just search SODA in the forums and download the project. It took everyone's breath away. It's fantastic.

The idea with SodaSpec is that you can define a "spec" object, which holds all the parameters used to create SODA objects. With the spec object:

  • you can define those parameters through functions that are easily discoverable through autocomplete, such as setSize(...) and setFontColor(...), .
  • you can easily create multiple objects from the same parameters. So given SodaSpec foo you can call foo:buildButton() and then call foo:buildWindow() and you'll get a button and a window created using the same settings.

Here's an example of creating a button in the middle of the screen:

spec = SodaSpec()
spec:setPosition(0.5, 0.5)
spec:setTitle("New Button")
newButton = spec:buildButton()

The demo project can be found here.

SODA deserves to be used all over the place, and I hope SodaSpec will help that happen!

Give it a try and implement a beautiful and powerful UI in your own projects!

Tagged:

Comments

Sign In or Register to comment.