2019-01-30 04:19:27 +00:00
|
|
|
sub Main()
|
2019-02-11 04:40:07 +00:00
|
|
|
m.port = CreateObject("roMessagePort")
|
2019-01-30 04:19:27 +00:00
|
|
|
|
2019-02-10 19:15:20 +00:00
|
|
|
if get_setting("server") = invalid then
|
2019-02-11 04:40:07 +00:00
|
|
|
print "Moving to server select"
|
2019-02-10 20:47:24 +00:00
|
|
|
ShowServerSelect()
|
2019-02-10 19:15:20 +00:00
|
|
|
end if
|
|
|
|
|
2019-02-10 20:47:24 +00:00
|
|
|
print("WE MOVED ON")
|
2019-02-23 03:14:21 +00:00
|
|
|
' if get_setting("active_user") = invalid then
|
|
|
|
' screen = CreateObject("roSGScreen")
|
|
|
|
' screen.setMessagePort(m.port)
|
2019-02-10 20:47:24 +00:00
|
|
|
|
2019-02-23 03:14:21 +00:00
|
|
|
' screen.CreateScene("UserSignIn")
|
|
|
|
' screen.show()
|
2019-02-10 19:15:20 +00:00
|
|
|
' TODO - sign in here
|
2019-02-23 03:14:21 +00:00
|
|
|
' await_response()
|
|
|
|
' screen.close()
|
|
|
|
' end if
|
2019-02-10 19:15:20 +00:00
|
|
|
|
2019-02-10 20:47:24 +00:00
|
|
|
screen = CreateObject("roSGScreen")
|
|
|
|
screen.setMessagePort(m.port)
|
|
|
|
|
2019-02-04 02:57:52 +00:00
|
|
|
first_scene = "Library"
|
2019-01-30 14:59:27 +00:00
|
|
|
'Create a scene and load a component'
|
2019-02-04 02:57:52 +00:00
|
|
|
m.scene = screen.CreateScene(first_scene)
|
2019-01-30 04:19:27 +00:00
|
|
|
screen.show()
|
|
|
|
|
2019-02-03 21:15:17 +00:00
|
|
|
libs = LibraryList().items
|
2019-02-04 02:57:52 +00:00
|
|
|
librow = m.scene.findNode("LibrarySelect")
|
|
|
|
|
|
|
|
'librow.GetRowListContent()
|
2019-02-03 21:15:17 +00:00
|
|
|
|
2019-02-18 22:44:17 +00:00
|
|
|
print 1 + "halt" ' Mixed types stops the debugger
|
2019-02-10 20:47:24 +00:00
|
|
|
|
2019-01-30 04:19:27 +00:00
|
|
|
while(true)
|
|
|
|
msg = wait(0, m.port)
|
|
|
|
msgType = type(msg)
|
|
|
|
if msgType = "roSGScreenEvent"
|
2019-02-11 04:40:07 +00:00
|
|
|
if msg.isScreenClosed() then exit while
|
2019-01-30 04:19:27 +00:00
|
|
|
end if
|
|
|
|
end while
|
|
|
|
end sub
|
|
|
|
|
2019-02-10 20:47:24 +00:00
|
|
|
sub ShowServerSelect()
|
|
|
|
screen = CreateObject("roSGScreen")
|
|
|
|
screen.setMessagePort(m.port)
|
2019-02-11 04:40:07 +00:00
|
|
|
scene = screen.CreateScene("ServerSelection")
|
2019-02-10 20:47:24 +00:00
|
|
|
screen.show()
|
2019-01-31 04:56:15 +00:00
|
|
|
|
2019-02-23 03:14:21 +00:00
|
|
|
await_response()
|
2019-02-10 20:47:24 +00:00
|
|
|
end sub
|
2019-01-31 04:56:15 +00:00
|
|
|
|
2019-02-10 20:47:24 +00:00
|
|
|
sub await_response()
|
|
|
|
while(true)
|
|
|
|
msg = wait(0, m.port)
|
|
|
|
msgType = type(msg)
|
|
|
|
if msgType = "roSGScreenEvent"
|
|
|
|
if msg.isScreenClosed() then return
|
2019-02-23 03:14:21 +00:00
|
|
|
else
|
|
|
|
print(msgType)
|
2019-02-10 20:47:24 +00:00
|
|
|
end if
|
|
|
|
end while
|
|
|
|
end sub
|