Created
February 21, 2017 20:32
-
-
Save netopyr/5c8545be060ecf037c397d58725daf42 to your computer and use it in GitHub Desktop.
Example for multiple stages with ReduxFX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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