Fix error message caused by adding new parameter to background (#8922)

Adds background9[] element to keep backwards compatibility in formspec prepends.
master
rubenwardy 2019-09-29 12:40:59 +01:00 committed by SmallJoker
parent 16865a5bf6
commit 07bdd6049b
2 changed files with 3 additions and 3 deletions

View File

@ -2114,7 +2114,7 @@ Elements
* If `auto_clip` is `true`, the background is clipped to the formspec size * If `auto_clip` is `true`, the background is clipped to the formspec size
(`x` and `y` are used as offset values, `w` and `h` are ignored) (`x` and `y` are used as offset values, `w` and `h` are ignored)
### `background[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>;<middle>]` ### `background9[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>;<middle>]`
* 9-sliced background. See https://en.wikipedia.org/wiki/9-slice_scaling * 9-sliced background. See https://en.wikipedia.org/wiki/9-slice_scaling
* Middle is a rect which defines the middle of the 9-slice. * Middle is a rect which defines the middle of the 9-slice.

View File

@ -2231,8 +2231,8 @@ void GUIFormSpecMenu::parseElement(parserData* data, const std::string &element)
return; return;
} }
if (type == "background") { if (type == "background" || type == "background9") {
parseBackground(data,description); parseBackground(data, description);
return; return;
} }