mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 02:07:38 +00:00
Theme: draw plain black bg if no [main_map_border] background_image= is given
This commit is contained in:
parent
9f22a56370
commit
ff341cc8ee
@ -66,6 +66,8 @@ Version 1.13.11:
|
||||
* Added confirmation prompt when clearing map labels.
|
||||
* Added show_border= key to the [main_map_border] to control whether map
|
||||
borders draw. Right now this is utilized in the cutscene themes.
|
||||
* If [main_map_border] background_image= is empty, the game map background
|
||||
will be plain black.
|
||||
* WFL Engine:
|
||||
* A new string insert() function has been added, similar to replace()
|
||||
* WML Engine:
|
||||
|
@ -15,7 +15,6 @@
|
||||
#define CUTSCENE_THEME_BACKGROUND
|
||||
[main_map_border]
|
||||
border_size = 0.5
|
||||
background_image = "terrain/off-map/background.png~CS(-255,-255,-255)"
|
||||
tile_image = "alphamask.png"
|
||||
show_border = no
|
||||
[/main_map_border]
|
||||
|
@ -1502,13 +1502,19 @@ void display::draw_all_panels()
|
||||
render_buttons();
|
||||
}
|
||||
|
||||
|
||||
static void draw_background(surface screen, const SDL_Rect& area, const std::string& image)
|
||||
{
|
||||
// No background image, just fill in black.
|
||||
if(image.empty()) {
|
||||
sdl::fill_rectangle(area, color_t(0, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
const surface background(image::get_image(image));
|
||||
if(background.null()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const unsigned int width = background->w;
|
||||
const unsigned int height = background->h;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user