2010-05-12

Woopsi 0.47 Released

Though the blog has been quiet, Woopsi development continues. As you’d expect, this release mainly fixes bugs. It does add a few features and change a few APIs, though.

Mark Adamson has been developing a rubix cube app for the DS that uses Woopsi as its UI. He contacted me a while ago to ask for a modified version that uses just one screen, which I provided, and has returned the favour by creating some neat new gadgets and offered them for inclusion in Woopsi itself. So far I have added the ColourPicker gadget, which uses a set of three RGB sliders to choose a colour. His tabbed interface might turn up in a future release.

I’ve been testing some of Woopsi’s features by developing a simple PipeMania-style app. It’s actually closer to the hacking subgame in Bioshock than the original game at the moment, though that will probably change if I ever finish it. During the course of making it, it became obvious that Woopsi was lacking a “drop” event that would fire when a dragged gadget was released. Drop events are now included, so creating drag-and-drop functionality is now simple. Gadgets can also report whether or not they are being dragged via a new “isBeingDragged()” method. The partially-complete PipeDream game is included in the examples directory.

In the last release, I created abstract base classes for some of the more common types of gadget - TextBoxBase, SliderBase and ListBoxBase. These ensure that anything that looks like a TextBox (for example) is guaranteed to present the same API. I’ve extended that to classes that look like ScrollingPanels. I’ve removed all data and methods from the ScrollableBase class to make it more like a C#/Java interface. I’ve also added a ScrollablePanel compound gadget that includes a ScrollingPanel gadget, a ScrollbarVertical gadget and a ScrollbarHorizontal gadget. It’s basically a scrollable region with scrollbars.

The ScrollingPanel had a few bugs introduced by the recent Graphics/GraphicsUnclipped changes. Its child gadgets could be drawn to the wrong screen; Gadget::getPhysicalScreenNumber() is now more intelligent to stop this happening. The Graphics::scroll() method was returning rects of the wrong size in its revealed rects array, which has also been fixed.

The last big change is a simplification of the AmigaScreen and AmigaWindow gadgets. Both used subgadgets to render their borders. However, this meant that creating subclasses of these gadgets that changed their appearance was a more complex task than it needed to be. I have removed all of the border classes, with the exception of the close/depth/flip buttons, and merged their drawing routines into the AmigaScreen and AmigaWindow gadgets. Changing their appearance is now simply a matter of subclassing and overriding their drawBorder() methods. You can download the latest release from the usual place:

http://www.sourceforge.net/projects/woopsi