fix container subnodes render

This commit is contained in:
MihailRis 2024-09-08 17:38:14 +03:00
parent 8ddfa48339
commit 897d22b50e

View File

@ -87,14 +87,15 @@ void Container::draw(const DrawContext* pctx, Assets* assets) {
auto batch = pctx->getBatch2D();
batch->texture(nullptr);
if (!nodes.empty()) {
batch->flush();
{
DrawContext ctx = pctx->sub();
ctx.setScissors(glm::vec4(pos.x, pos.y, size.x, size.y));
for (const auto& node : nodes) {
if (node->isVisible())
node->draw(pctx, assets);
}
batch->flush();
}
}