Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GUI2/Canvas: allow the default draw routine (shape drawing) to be ove…
…rridden Previously widgets that wanted to implement custom drawing behavior overrode styled_widget::impl_draw_background or impl_draw_foreground. Those functions in the base class simply called the canvas render methods. Some widgets such as the minimap ignored that rendered the contents on their own. This new method allows rendering directly to the canvas's texture, meaning all the caching and sizing is already handled by the canvas and doesn't need to be done by the widget; everything's always the right size and redrawn when necessary.
- Loading branch information
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters