Skip to content

Instantly share code, notes, and snippets.

@netopyr
Created February 21, 2017 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netopyr/5c8545be060ecf037c397d58725daf42 to your computer and use it in GitHub Desktop.
Save netopyr/5c8545be060ecf037c397d58725daf42 to your computer and use it in GitHub Desktop.
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