Soda v0.2 is now available at the GitHub link at the top of the post.
It now has fairly comprehensive hyperlinked documentation, in the GitHub readme (in the demo, you can access this page by pressing the query button in the corner of the pane)
Here are the release notes:
Version Notes
v0.2
-
NEW
Soda.DropdownList
- A button which, when pressed, toggles a dropdown list (this is a wrapper or factory which makes it much easier to setup dropdown lists). When an item is selected from the list, the button’s label changes to reflect the selection, and an optional callback is triggered. -
NEW
Soda.Toggle
- now, in addition to iOS-styleSoda.Switch
(with an animated lever that ficks back and forth), any button can behave as a toggle. This has been implemented by separating the graphics and animation ofSoda.Switch
from the toggle button logic. -
Callbacks have been made more consistent and are triggered by more elements. Callbacks are now always triggered as
self:callback
(with a colon) so the first argument passed to the callback will always be the sender’s self. If you have any callbacks that take an argument, egcallback = function(inkey)
, these will now need to have aself
/this
variable as their first argument (how you name the variables passed to the callback is up to you): egcallback = function(self, inkey)
.-
In
Soda.TextEntry
, callback is triggered by hitting return or the close keyboard button (but not by selecting a different interface element, which closes the keyboard and cancels text entry). Callback is passed the string entered. -
In
Soda.List
, callbacks return 3 variables: 1) the sender (the list object itself), 2) the selected item, 3) the selected item’s title string -
Soda.Toggle
andSoda.Switch
have two callbacks:callback
(when on state is activated) andcallbackOff
-
-
new
update
parameter. Like a callback, but triggered every frame, in case any elemenets need constant updating (see the new profiler panel in the demo). -
If you’re using iOS 9, TextEntry fields now have cut, copy, and paste
-
The
Soda.Control
wrapper is now calledSoda.Window
-
The
drawing
function called indraw
must now be calledSoda.drawing