Reverse order of draw in ScreenStack
Some checks failed
Build and Publish WASM version of demo / Build-And-Deploy (push) Failing after 6s

Draws should be in order from bottom to top.
This commit is contained in:
Stephen Seo 2023-08-23 15:06:14 +09:00
parent 9a99e8f264
commit f091bbf0fd

View file

@ -62,8 +62,7 @@ void ScreenStack::update(float dt) {
}
void ScreenStack::draw() {
auto idx = stack.size();
while (idx > 0 && stack.at(--idx)->draw()) {
for (auto idx = 0; idx < size.size() && stack.at(idx)->draw(); ++idx) {
}
}