In continuation of my Abiathar tool refactoring project, I folded the implementation of drawing a highlight on the tile under the mouse into the Abiathar core.
This required a bit of caution so as to not create an unnecessary slowdown when a user doesn't want/like the TOM-style single-tile highlight and turns it off in the config file (which I do, and so it's off by default). The renderer now paints the under-mouse highlight after all the planes. When the mouse is moved, the mouse-over routine makes sure no tool's reaction caused a repaint so that the screen isn't unnecessarily repainted. While I was at it, I sped up the render plane iterator and ripped out the ability of planes to say that they don't want to be stretched to fit the zoom level. (I have no idea why I or anybody else would ever want to do that, and extensions that really have to can hook the paint event.)
I added an API command under ViewState to suppress the under-mouse highlight, since it now by default happens everywhere if the user enables it. Clearly, this isn't great for tools like the Paster that do their own at-mouse rendering. I am, however, still working on finding a good color for the highlight.
A minor tweak to the drag translation implementation was made to allow for tools to change their mind about their mode if they started with click-at-each step translation. I plan to take advantage of this when writing the Essential Manipulator.
This version will be called v2.5 rather than v2.4.2 as previously guessed.
No comments:
Post a Comment