mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add 'fallback' property to xml and scripting
This commit is contained in:
parent
18e7fb55a6
commit
6aac90094e
5 changed files with 19 additions and 4 deletions
|
|
@ -632,8 +632,10 @@ static std::shared_ptr<UINode> read_image(
|
|||
const UiXmlReader& reader, const xml::xmlelement& element
|
||||
) {
|
||||
std::string src = element.attr("src", "").getText();
|
||||
auto image = std::make_shared<Image>(reader.getGUI(), src);
|
||||
std::string fallback = element.attr("fallback", "").getText();
|
||||
auto image = std::make_shared<Image>(reader.getGUI(), std::move(src));
|
||||
read_uinode(reader, element, *image);
|
||||
image->setFallback(std::move(fallback));
|
||||
|
||||
if (element.has("region")) {
|
||||
auto vec = element.attr("region").asVec4();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue