No new demo this time as all these changes are fairly inconsequential, so here they are as a list:
- Borderless windows fixed
- Added clipping to window borders (fixes window title overlap problem)
- Added clipping to screen title
- Added drawHorizLine() to SuperBitmap
- Added drawVertLine() to SuperBitmap
- Added drawRect() to SuperBitmap
- Added allowStylusScroll() to SuperBitmap
- Switched active window colour to closest approximation the DS can make to the original WB2.x blue
- Added setShineColour() to Gadget
- Added setHighlightColour() to Gadget
- Added setShadowColour() to Gadget
- Added setBackColour() to Gadget
- Added setFillColour() to Gadget
- Added events for lid opening and lid closing
- Made screen depth gadget wider so it is easier to click
- TextViewer clips correctly when drawing/scrolling (though it still doesn’t clip to the invalid region when redrawing)
- Moved child gadget vector from Screen and Window into Gadget
- Moved drawChildren() from Screen and Window into Gadget
Moving the hierarchy into the Gadget class makes more sense than having it repeated every time I need a hierarchical relationship. I haven’t merged a lot of the code, though, as although much of it is similar across the Window/Screen/Gadget classes, there are enough differences to make it annoyingly complex to try and unify.
There still seems to be a problem with the left-hand bat in the Pong demo on real DS hardware. When the bat is against the top of the window, it suddenly grows vertically and extends for the full height of the window. Looks like a wrap-around problem in the clipping routine, except it works in both emulators, I’m certain that the clipping routine works, and the relevant values in the clipping routine are all signed 32-bit ints so there shouldn’t be any possibility of a wrap-around.
Finally for today, I’ve copied the to-do list into a separate page in the right-hand navigation (called “Woopsi”) and updated it.