2020-09-01 14:56:12 +00:00
|
|
|
package nova.monadic_sfx.ui.screens
|
|
|
|
|
2020-12-15 07:21:25 +00:00
|
|
|
import monix.eval.Task
|
2020-09-01 14:56:12 +00:00
|
|
|
import scalafx.application.JFXApp.PrimaryStage
|
|
|
|
import scalafx.scene.Parent
|
|
|
|
|
|
|
|
trait Screen {
|
|
|
|
protected def appStage: PrimaryStage
|
|
|
|
def changeRoot(root: Parent): Unit = {
|
|
|
|
appStage.scene().setRoot(root)
|
|
|
|
}
|
|
|
|
def changeRootL(root: Parent): Task[Unit] = Task(changeRoot(root))
|
|
|
|
}
|