Begin to make serverselect a dialog
This commit is contained in:
parent
1b635a3b3b
commit
3f59699c70
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="ServerSelection" extends="Scene">
|
||||
<component name="ServerSelection" extends="dialog">
|
||||
<children>
|
||||
<label text="Connect to Server"
|
||||
height="70"
|
||||
|
|
|
@ -33,6 +33,8 @@ function APIRequest(url as String, params={} as Object)
|
|||
end function
|
||||
|
||||
function parseRequest(req)
|
||||
'req.retainBodyOnError(True)
|
||||
'print req.GetToString()
|
||||
json = ParseJson(req.GetToString())
|
||||
return json
|
||||
end function
|
||||
|
|
|
@ -3,21 +3,27 @@ sub Main()
|
|||
screen = CreateObject("roSGScreen")
|
||||
screen.setMessagePort(m.port)
|
||||
m.scene = screen.CreateScene("Library")
|
||||
m.screen = screen
|
||||
|
||||
screen.show()
|
||||
|
||||
if get_setting("server") = invalid then
|
||||
print "Get server details"
|
||||
' TODO - make this into a dialog
|
||||
' TODO - be able to submit server info
|
||||
' ShowServerSelect()
|
||||
end if
|
||||
|
||||
if get_setting("active_user") = invalid then
|
||||
print "Get user login"
|
||||
' TODO - make this into a dialog
|
||||
' screen.CreateScene("UserSignIn")
|
||||
' TODO - sign in here
|
||||
end if
|
||||
|
||||
' TODO - something here to validate that the active_user is still
|
||||
' valid.
|
||||
|
||||
library = m.scene.findNode("LibrarySelect")
|
||||
libs = LibraryList()
|
||||
library.libList = libs
|
||||
|
@ -32,10 +38,9 @@ sub Main()
|
|||
end sub
|
||||
|
||||
sub ShowServerSelect()
|
||||
screen = CreateObject("roSGScreen")
|
||||
screen.setMessagePort(m.port)
|
||||
scene = screen.CreateScene("ServerSelection")
|
||||
screen.show()
|
||||
dialog = CreateObject("roSGNode", "ServerSelection")
|
||||
dialog.title = "Select Server"
|
||||
m.scene.dialog = dialog
|
||||
|
||||
await_response()
|
||||
end sub
|
||||
|
|
Loading…
Reference in New Issue
Block a user