FXGL for admin/business UI #1155
Replies: 2 comments 2 replies
-
Hi, FXGL behaves in a very similar way to a normal JavaFX app. If the only thing you are planning to use from FXGL is the UI, there is really no need to use entity factories and the like -- this can be done through normal Java / JavaFX code. You can define each screen as a subscene. Check out the wiki. Having a normal business application with FXGL is very feasible and I'm happy to add a new sample demonstrating it. If you could provide a full use case of the application, I'll open an issue to create a simple clone of that. |
Beta Was this translation helpful? Give feedback.
-
Great, thank you! Will look into it and see how to move on |
Beta Was this translation helpful? Give feedback.
-
Hi,
having done a few UI:s in Java FX over the past years I ran into FXGL and see that it is able to perform a lot nicer UI experiences compared to plain vanilla FX. What I started out with now is a simple admin UI where the user first sees a splash screen, then a log in screen with user name and pw, and at last the actual admin form where some choices needs to be made by the user. So really two screens in total. I haven't seen any example out there for a business or admin form app using FXGL.
What is the best approach to use? From what I found out after a few hours of trial and errors the addUINode seems to be the way to go. When I first used spawn I find it difficult to add event handlers to the spawned objects.
This is my code so far, showing the essential part initGame. The drawback with using addUINode for all input controls is that it seems to be necessary to declare them all in initGame(). So when adding more screens to the app the initGame() procedure will be rather hefty
@OverRide
protected void initGame() {
Regards,
Henrik
Beta Was this translation helpful? Give feedback.
All reactions