Skip to content

Commit 07bdd60

Browse files
rubenwardySmallJoker
authored andcommittedSep 29, 2019
Fix error message caused by adding new parameter to background (#8922)
Adds background9[] element to keep backwards compatibility in formspec prepends.
1 parent 16865a5 commit 07bdd60

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎doc/lua_api.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ Elements
21142114
* If `auto_clip` is `true`, the background is clipped to the formspec size
21152115
(`x` and `y` are used as offset values, `w` and `h` are ignored)
21162116

2117-
### `background[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>;<middle>]`
2117+
### `background9[<X>,<Y>;<W>,<H>;<texture name>;<auto_clip>;<middle>]`
21182118

21192119
* 9-sliced background. See https://en.wikipedia.org/wiki/9-slice_scaling
21202120
* Middle is a rect which defines the middle of the 9-slice.

‎src/gui/guiFormSpecMenu.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2231,8 +2231,8 @@ void GUIFormSpecMenu::parseElement(parserData* data, const std::string &element)
22312231
return;
22322232
}
22332233

2234-
if (type == "background") {
2235-
parseBackground(data,description);
2234+
if (type == "background" || type == "background9") {
2235+
parseBackground(data, description);
22362236
return;
22372237
}
22382238

0 commit comments

Comments
 (0)
Please sign in to comment.