mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-22 02:12:58 +00:00
Regenerate story screen message panel blur when background changes.
This commit is contained in:
parent
7695ee7159
commit
ca5edd5336
@ -550,6 +550,11 @@ bool canvas::update_blur(const rect& screen_region, bool force)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void canvas::queue_reblur()
|
||||||
|
{
|
||||||
|
blur_texture_.reset();
|
||||||
|
}
|
||||||
|
|
||||||
void canvas::draw()
|
void canvas::draw()
|
||||||
{
|
{
|
||||||
// This early-return has to come before the `validate(rect.w <= w_)` check, as during the boost_unit_tests execution
|
// This early-return has to come before the `validate(rect.w <= w_)` check, as during the boost_unit_tests execution
|
||||||
|
@ -101,6 +101,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool update_blur(const rect& screen_region, const bool force = false);
|
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.
|
* Draw the canvas' shapes onto the screen.
|
||||||
*
|
*
|
||||||
|
@ -307,6 +307,9 @@ void story_viewer::display_part()
|
|||||||
text_label.set_text_alpha(0);
|
text_label.set_text_alpha(0);
|
||||||
text_label.set_label(part_text);
|
text_label.set_label(part_text);
|
||||||
|
|
||||||
|
// Regenerate any background blur texture
|
||||||
|
panel_canvas.queue_reblur();
|
||||||
|
|
||||||
begin_fade_draw(true);
|
begin_fade_draw(true);
|
||||||
// if the previous page was skipped, it is possible that we already have a timer running.
|
// if the previous page was skipped, it is possible that we already have a timer running.
|
||||||
clear_image_timer();
|
clear_image_timer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user