Not sure if it can be repeated on a clean project, but I'll leave it here for further research and testing.
- Correct rendering
public void render() {
stage.getViewport().setScreenBounds(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
stage.getViewport().apply(true);
stage.act(Gdx.graphics.getDeltaTime());
stage.draw();
}
Result is:
https://imgshare.cc/3juuc570
- Incorrect rendering
public void render() {
stage.getViewport().setScreenBounds(30, 20, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
stage.getViewport().apply(true);
stage.act(Gdx.graphics.getDeltaTime());
stage.draw();
}
Result is clipped actors by x=30 and y=20 respectively:
https://imgshare.cc/3pntjv8d
Actors which got clipped are specifically VerticalGroups, nested inside Window (all instances of WidgetGroup, consisting of other child actors) if thats matters. It seems that renderer applies viewport offset to each WidgetGroup separately.
Not sure if it can be repeated on a clean project, but I'll leave it here for further research and testing.
Result is:
https://imgshare.cc/3juuc570
Result is clipped actors by x=30 and y=20 respectively:
https://imgshare.cc/3pntjv8d
Actors which got clipped are specifically VerticalGroups, nested inside Window (all instances of WidgetGroup, consisting of other child actors) if thats matters. It seems that renderer applies viewport offset to each WidgetGroup separately.