update Actor

This commit is contained in:
Nomango 2020-08-08 15:12:08 +08:00
parent 38d4eb214a
commit 10e3aec9cc
1 changed files with 4 additions and 1 deletions

View File

@ -148,6 +148,9 @@ void Actor::PrepareToRender(RenderContext& ctx)
void Actor::RenderBorder(RenderContext& ctx)
{
if (!visible_)
return;
if (show_border_ && !size_.IsOrigin())
{
Rect bounds = GetBounds();
@ -373,7 +376,7 @@ void Actor::SetStage(Stage* stage)
stage_ = stage;
for (auto& child : children_)
{
child->stage_ = stage;
child->SetStage(stage);
}
}
}