I'm currently updating the split off drag & draw patch (that I hope has chances to go to trunk) to the changes made to the window system. I've already made good progress, but now I've got to make a change to an existing function so I'd like to discuss with you (devs! yes I know you're here, don't go hiding!) what is preferred:
I need information about the end_tile of the selection in Window:OnPlaceDrag. This is because with drag&draw, I want to execute the wanted command on every mouse movement (if the underlying tile has changed, that is), not only when the mouse is released again.
It currently has:
Code: Select all
OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
Compare to OnPlaceMouseUp, which has:
Code: Select all
OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
Now I have two possibilities: Either change Window:OnPlaceDrag to include at least the end_tile in its parameters, or change "void VpSelectTilesWithMethod" (which is usually called in OnPlaceDrag to "TileIndex VpSelectTileWithMethod(...)", to return the TileIndex of the end tile of the selection.
Which one of these two would be preferred? Currently, I have chosen the second possibility, but I'm not sure if it's the right way. The other option would need changing the class function though...
Here's my current .diff:
I've really put effort into this now to make it clean and small and nice and understandable.. please don't let me die here, devs..

PS: SmatZ, weren't you interested in this short time ago? I've done what you suggested, so where are you now?
edit: updated to r13265