Everything’s a power

Have now got powers properly working with cursor behaviours. That is, powers can trigger changes to cursor behaviours, and changes to cursor behaviours are propagated back to powers. So this means (for example), that if you change your mind about placing an inn, you can click on the “Inn” button a second time to cancel it. Alternately, you can click on any other build icon. Either way, the button highlights now work properly to show exactly what you’re about to do.

I’ve also now fixed things so that action bars deactivate all their buttons when they’re hidden.  This means that (for example) if you click the “place inn” button, then switch to the ‘Roads’ action bar, you won’t still invisibly have the “place inn” functionality invisibly active;  it’s automatically disabled when you switch action bars.  (This has actually been a bug that’s been present since v1.1, but it’d been getting steadily worse in 2.0, with all the new functionality being added)

Finally, I tracked down a rendering glitch which was causing only the last highlighted button on an action bar to be drawn highlighted.  This was actually a bug in the material cache, at a very low level within VectorStorm.  I’m still not precisely sure what was wrong about it;  only that if I disable the “if the material hasn’t changed, don’t bother pumping all the renderer state changes out to OpenGL”.  Clearly I’ve missed something that’s changing renderer state somewhere, but I’m kind of baffled about it.  For now, I’ve just disabled the cache and stuff is working properly.