Example for multiple stages with ReduxFX
public static VNode view(AppModel state) { | |
return Stages() | |
.children( | |
Stage() | |
.title("Left Screen") | |
.showing(state.getScreen() == Screen.LEFT) | |
.scene( | |
Scene() | |
.root( | |
StackPane() | |
.padding(50, 100) | |
.children( | |
Button() | |
.text("Next") | |
.onAction(e -> Actions.switchScreen(Screen.RIGHT)) | |
) | |
) | |
), | |
Stage() | |
.title("Right Screen") | |
.showing(state.getScreen() == Screen.RIGHT) | |
.scene( | |
Scene() | |
.root( | |
StackPane() | |
.padding(50, 100) | |
.children( | |
Button() | |
.text("Previous") | |
.onAction(e -> Actions.switchScreen(Screen.LEFT)) | |
) | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment