2023-10-03 16:11:25 +00:00
|
|
|
import "pkg:/source/utils/misc.bs"
|
2023-05-03 21:21:04 +00:00
|
|
|
|
2019-10-13 19:33:14 +00:00
|
|
|
sub init()
|
2021-07-09 20:08:32 +00:00
|
|
|
m.top.backgroundColor = "#262626" '"#101010"
|
|
|
|
m.top.backgroundURI = ""
|
2023-11-22 02:14:40 +00:00
|
|
|
m.spinner = m.top.findNode("spinner")
|
|
|
|
end sub
|
|
|
|
|
|
|
|
' Triggered when the isLoading boolean component field is changed
|
|
|
|
sub isLoadingChanged()
|
2023-11-22 13:38:16 +00:00
|
|
|
m.spinner.visible = m.top.isLoading
|
2023-11-22 02:14:40 +00:00
|
|
|
end sub
|
|
|
|
|
|
|
|
' Triggered when the disableRemote boolean component field is changed
|
|
|
|
sub disableRemoteChanged()
|
|
|
|
if m.top.disableRemote
|
|
|
|
dialog = createObject("roSGNode", "ProgressDialog")
|
|
|
|
dialog.id = "invisibiledialog"
|
|
|
|
dialog.visible = false
|
|
|
|
dialog.opacity = 0
|
|
|
|
m.top.dialog = dialog
|
|
|
|
else
|
|
|
|
if isValid(m.top.dialog)
|
|
|
|
m.top.dialog.close = true
|
|
|
|
end if
|
|
|
|
end if
|
2019-10-13 19:33:14 +00:00
|
|
|
end sub
|
|
|
|
|
|
|
|
function onKeyEvent(key as string, press as boolean) as boolean
|
2021-07-09 20:08:32 +00:00
|
|
|
if not press then return false
|
2019-10-13 19:33:14 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
if key = "back"
|
2021-10-10 01:51:33 +00:00
|
|
|
m.global.sceneManager.callFunc("popScene")
|
2021-07-09 20:08:32 +00:00
|
|
|
return true
|
|
|
|
else if key = "options"
|
2021-10-10 01:51:33 +00:00
|
|
|
group = m.global.sceneManager.callFunc("getActiveScene")
|
2022-12-23 17:37:44 +00:00
|
|
|
if isValid(group) and isValid(group.optionsAvailable) and group.optionsAvailable
|
2021-09-14 02:03:32 +00:00
|
|
|
group.lastFocus = group.focusedChild
|
|
|
|
panel = group.findNode("options")
|
|
|
|
panel.visible = true
|
|
|
|
panel.findNode("panelList").setFocus(true)
|
|
|
|
end if
|
2021-07-09 20:08:32 +00:00
|
|
|
return true
|
|
|
|
end if
|
2019-10-13 19:33:14 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
return false
|
2019-10-13 19:33:14 +00:00
|
|
|
end function
|