-
-
Notifications
You must be signed in to change notification settings - Fork 559
Dialogs (FXGL 11)
Almas Baimagambetov edited this page May 30, 2020
·
4 revisions
Sometimes we want to show a dialog in our game to obtain user input. There are a few built-in dialogs available, including a "generic" one for custom controls. Furthermore, each built-in dialog can be view-customized by providing own DialogFactoryService
. For example:
settings.setEngineServiceProvider(DialogFactoryService.class, CustomDialogFactoryService.class);
If you want a quick sample with all of these dialogs, try out Dialogs Sample. Otherwise, each built-in dialog is given below.
getDialogService().showMessageBox("This is a simple message box", () -> {
// code to run after dialog is dismissed
});