The ListBox and ScrollingListBox (a ListBox with a scrollbar) are finished. I’ve added some more functions for working with the options within a ListBox and an alphabetical sort routine (I was looking into sorts for something else today, so decided to add one in). The ScrollingListBox features both smooth scrolling (when the list is dragged) and jump scrolling (when the scrollbar is dragged). The previously untested theories about how the scrollbars would work in this situation have all turned out to accurate. Hurrah!
As I haven’t put one up in ages, here’s a screenshot:
Another quick change - John requested a way to change the default colours for the gadgets. There’s now a static “DefaultStyle” class that contains all of the default colour data. Altering the variables in this class will cause any gadgets constructed afterwards to use the changed values as their colour settings. There’s also a font pointer that, if set to anything other than NULL, Woopsi will use as the system font. Again, that should be set before you any construct any gadgets that should use the alternative font, as the gadgets make copies of all variables. The developer is responsible for deleting that font when it is no longer needed.
Here’s a screenshot of a nasty salmon version of Woopsi made by mucking about with the new DefaultStyle class: