FXGL icon indicating copy to clipboard operation
FXGL copied to clipboard

FXGLDefaultMenu layout is not responsive

Open AlmasB opened this issue 4 years ago • 1 comments

module: fxgl package: com.almasb.fxgl.app.scene file: FXGLDefaultMenu.kt

https://github.com/AlmasB/FXGL/blob/43a1a24ac82b03ed733734c2c35ececb0bf5c4e2/fxgl/src/main/kotlin/com/almasb/fxgl/app/scene/FXGLDefaultMenu.kt#L90-L92

These are hardcoded, instead we should listen for (bind to) settings.prefWidth/Height properties.

You can check the result of this working (or not working) in fxgl-samples module by running a MenuSample and adding settings.setManualResizeEnabled(true);, then resizing the game at runtime.

Currently on resize, the hardcoded values will not result in a responsive layout.

AlmasB avatar Apr 21 '21 17:04 AlmasB

Discussed & Fixed.

@artemijsem @BeckFW

DaleHuntGB avatar Feb 19 '24 12:02 DaleHuntGB