Regenerate story screen message panel blur when background changes.

This commit is contained in:
Tommy 2023-10-29 03:30:52 +13:00
parent 7695ee7159
commit ca5edd5336
3 changed files with 11 additions and 0 deletions

View File

@ -550,6 +550,11 @@ bool canvas::update_blur(const rect& screen_region, bool force)
return true;
}
void canvas::queue_reblur()
{
blur_texture_.reset();
}
void canvas::draw()
{
// This early-return has to come before the `validate(rect.w <= w_)` check, as during the boost_unit_tests execution

View File

@ -101,6 +101,9 @@ public:
*/
bool update_blur(const rect& screen_region, const bool force = false);
/** Clear the cached blur texture, forcing it to regenerate. */
void queue_reblur();
/**
* Draw the canvas' shapes onto the screen.
*

View File

@ -307,6 +307,9 @@ void story_viewer::display_part()
text_label.set_text_alpha(0);
text_label.set_label(part_text);
// Regenerate any background blur texture
panel_canvas.queue_reblur();
begin_fade_draw(true);
// if the previous page was skipped, it is possible that we already have a timer running.
clear_image_timer();