Simplize backgrouds' update.
This commit is contained in:
parent
442b7d065b
commit
4b63b35d07
|
@ -144,6 +144,11 @@ bool Container::hasInternalChange() const
|
|||
void Container::update() const
|
||||
{
|
||||
auto &window = getRoot()->windowSFWindow();
|
||||
if (isRoot())
|
||||
{
|
||||
window.clear(backgroudColor);
|
||||
return;
|
||||
}
|
||||
window.setView(view);
|
||||
sf::RectangleShape bg(vec(size.x, size.y));
|
||||
bg.setPosition(vec(0.f, 0.f));
|
||||
|
|
Loading…
Reference in New Issue