You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
341 B

  1. package nova.monadic_sfx.ui.screens
  2. import scalafx.application.JFXApp.PrimaryStage
  3. import scalafx.scene.Parent
  4. import monix.eval.Task
  5. trait Screen {
  6. protected def appStage: PrimaryStage
  7. def changeRoot(root: Parent): Unit = {
  8. appStage.scene().setRoot(root)
  9. }
  10. def changeRootL(root: Parent): Task[Unit] = Task(changeRoot(root))
  11. }