fix(scene/transition): set opacity of from.root and to.root

This commit is contained in:
2025-09-30 17:41:36 +07:00
parent eeaa1e2252
commit 66ebb021e0
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,6 @@ public class Game extends ApplicationAdapter {
transition.render(batch); transition.render(batch);
batch.end(); batch.end();
// Handle stage drawing for UI elements // Handle stage drawing for UI elements
stage.act(Gdx.graphics.getDeltaTime());
stage.draw(); stage.draw();
return; return;
} }

View File

@ -51,9 +51,11 @@ public class Transition extends Scene {
log.trace("Transition opacities - from: {}, to: {}", fromOpacity, toOpacity); log.trace("Transition opacities - from: {}, to: {}", fromOpacity, toOpacity);
batch.setColor(1, 1, 1, fromOpacity); batch.setColor(1, 1, 1, fromOpacity);
from.root.setVisible(true); from.root.setVisible(true);
from.root.setColor(1, 1, 1, fromOpacity);
from.render(batch); from.render(batch);
batch.setColor(1, 1, 1, toOpacity); batch.setColor(1, 1, 1, toOpacity);
to.root.setVisible(true); to.root.setVisible(true);
to.root.setColor(1, 1, 1, toOpacity);
to.render(batch); to.render(batch);
} }
} }