diff --git a/source/HelperUtils.brs b/source/HelperUtils.brs index 7d9db1e0..6ce27015 100644 --- a/source/HelperUtils.brs +++ b/source/HelperUtils.brs @@ -40,3 +40,12 @@ function leftPad(base as string, fill as string, length as integer) as string end while return base end function + +function make_dialog(message="" as string) + dialog = createObject("roSGNode", "Dialog") + dialog.id = "popup" + dialog.buttons = ["OK"] + dialog.message = message + + return dialog +end function diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index 343abc03..6c0a3c4f 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -6,7 +6,7 @@ sub ShowServerSelect() screen.show() themeScene(scene) - scene.findNode("prompt").text = "Connect to Serviette" + scene.findNode("prompt").text = "Connect to Server" config = scene.findNode("configOptions") items = [ @@ -116,8 +116,15 @@ sub ShowLibrarySelect() else if target.libraryType = "tvshows" ShowTVShowOptions(target.data) else - print Substitute("Library type {0} is not yet implemented", target.libraryType) + scene.dialog = make_dialog("This library type is not yet implemented") + scene.dialog.observeField("buttonSelected", port) end if + else if nodeEventQ(msg, "buttonSelected") + if msg.getNode() = "popup" + msg.getRoSGNode().close = true + end if + else + print msg end if end while end sub