修复房间选择界面光标越界

This commit is contained in:
MrZ626
2021-04-09 22:47:40 +08:00
parent e8650525b2
commit 2332d85434

View File

@@ -52,7 +52,7 @@ function scene.keyDown(k)
end
end
elseif k=="return"then
if NET.getlock("fetchRoom")then return end
if NET.getlock("fetchRoom")or not NET.roomList[selected]then return end
if NET.roomList[selected].private then
LOG.print("Can't enter private room now")
return
@@ -72,6 +72,9 @@ function scene.update(dt)
fetchRoom()
end
end
if #NET.roomList>0 and not NET.roomList[selected]then
selected=#NET.roomList
end
end
function scene.draw()