Preserve scene ratioSee original GitHub issue
basically, I want to make my game resizable, so I set
true. The built-in scale mechanism works well, except for the fact that I want to preserve the original ratio. I opted to create rectangles on both left and right of the scene so that the window could be resized as much as wanted, so that the actual game resolution would be the same. Honestly, I don’t know how to do this in FXGL since width/scale properties aren’t modified in
contentRoot and I don’t know where to set listeners.
- Created 4 years ago
- Comments:26 (15 by maintainers)
Top GitHub Comments
No, I’m afraid. Only 11+ is being developed. As FXGL 11 has a completely new architecture, it is not sensible to develop both, especially considering it is superior to FXGL 8 arch. Eventually, there might be a backport of the 11 codebase to 8 but no plans at the moment.
To get the latest build (once it completes), you can use this:
<dependencies> <dependency> <groupId>com.github.almasb</groupId> <artifactId>fxgl</artifactId> <version>dev-SNAPSHOT</version> </dependency> </dependencies> <repositories> <repository> <id>oss.sonatype.org-snapshot</id> <url>http://oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories>