mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add 'region' image property
This commit is contained in:
parent
032b5ae9dc
commit
79528a44ea
4 changed files with 20 additions and 1 deletions
|
|
@ -544,6 +544,11 @@ static std::shared_ptr<UINode> read_image(
|
|||
std::string src = element.attr("src", "").getText();
|
||||
auto image = std::make_shared<Image>(reader.getGUI(), src);
|
||||
read_uinode(reader, element, *image);
|
||||
|
||||
if (element.has("region")) {
|
||||
auto vec = element.attr("region").asVec4();
|
||||
image->setRegion(UVRegion(vec.x, vec.y, vec.z, vec.w));
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue