FXGL icon indicating copy to clipboard operation
FXGL copied to clipboard

set min and max size of the game window

Open xixinewbie opened this issue 9 months ago • 5 comments

Hello Almas, I'm tring this awesome game engine, but I encountered a confusion at the beginning as shown in this picture below. Is there any way similar to JavaFX that can set the min and max size of the game window? what FXGL do: Image

what JavaFX do: Image

xixinewbie avatar Mar 22 '25 18:03 xixinewbie

Hi, you should be able to access the Stage object via FXGL.getPrimaryStage() once it is loaded. Then you can call the JavaFX API as above.

Let me know if this works for your use case.

AlmasB avatar Mar 22 '25 19:03 AlmasB

Yes it works.

Image

xixinewbie avatar Mar 22 '25 19:03 xixinewbie

Sorry about another question, I noticed the Music support are only for mp3 and wav, but most of my game music is in ogg format, do you have any solution to this problem?

xixinewbie avatar Mar 22 '25 20:03 xixinewbie

The most straightforward solution is to probably use a converter from ogg to mp3.

AlmasB avatar Mar 23 '25 13:03 AlmasB

The most straightforward solution is to probably use a converter from ogg to mp3.

Thanks for your suggestion. After a day of searching, I decided to integrate lwjgl's openal function to play ogg music, just like libgdx do. After all, ogg is more suitable for games.

xixinewbie avatar Mar 23 '25 13:03 xixinewbie