新增开5人房的按钮

This commit is contained in:
MrZ626
2021-04-16 11:54:17 +08:00
parent 798a6c0eb6
commit ae41e5f2e6
5 changed files with 20 additions and 16 deletions

View File

@@ -253,7 +253,8 @@ return{
refreshing="Refreshing Rooms", refreshing="Refreshing Rooms",
noRoom="Such emptiness much void, come back later?", noRoom="Such emptiness much void, come back later?",
refresh="Refresh", refresh="Refresh",
new="New Room", new="New Room(2)",
new2="New Room(5)",
join="Join", join="Join",
up="", up="",
down="", down="",

View File

@@ -253,7 +253,8 @@ return{
-- refreshing="Refreshing Rooms", -- refreshing="Refreshing Rooms",
noRoom="Nenhuma sala agora", noRoom="Nenhuma sala agora",
-- refresh="Refresh", -- refresh="Refresh",
-- new="New room", -- new="New Room(2)",
-- new2="New Room(5)",
-- join="Join", -- join="Join",
up="", up="",
down="", down="",

View File

@@ -231,7 +231,8 @@ return{
-- refreshing="Refreshing Rooms", -- refreshing="Refreshing Rooms",
noRoom="No Hay Salas Actualmente", noRoom="No Hay Salas Actualmente",
refresh="Refrescar", refresh="Refrescar",
new="Sala Nueva", new="Sala Nueva(2)",
new2="Sala Nueva(5)",
join="Unirse", join="Unirse",
up="", up="",
down="", down="",

View File

@@ -253,7 +253,8 @@ return{
refreshing="刷新房间列表中", refreshing="刷新房间列表中",
noRoom="一个房间都没有哎...", noRoom="一个房间都没有哎...",
refresh="刷新", refresh="刷新",
new="创建房间", new="创建房间(2)",
new2="创建房间(5)",
join="加入", join="加入",
up="", up="",
down="", down="",

View File

@@ -28,15 +28,14 @@ function scene.keyDown(k)
if fetchTimer<=3.26 then if fetchTimer<=3.26 then
fetchRoom() fetchRoom()
end end
elseif k=="n"then elseif k=="m"or k=="n"then
if TIME()-lastCreateRoomTime>16.2 then if TIME()-lastCreateRoomTime>16.2 then
NET.createRoom( NET.createRoom(
kb.isDown("1")and"solo"or k=="m"and"classic"or
kb.isDown("2")and"classic"or
tonumber(USER.uid)<100 and( tonumber(USER.uid)<100 and(
kb.isDown("3")and"r49"or kb.isDown("q")and"r49"or
kb.isDown("4")and"r99"or kb.isDown("w")and"r99"or
kb.isDown("5")and"unlimited" kb.isDown("e")and"unlimited"
)or"solo", )or"solo",
(USERS.getName(USER.uid)or"???").."'s room" (USERS.getName(USER.uid)or"???").."'s room"
) )
@@ -87,7 +86,7 @@ end
function scene.draw() function scene.draw()
--Fetching timer --Fetching timer
gc.setColor(1,1,1,.26) gc.setColor(1,1,1,.26)
gc.arc("fill","pie",240,620,60,-1.5708,-1.5708-1.2566*fetchTimer) gc.arc("fill","pie",130,620,60,-1.5708,-1.5708-1.2566*fetchTimer)
--Room list --Room list
gc.setColor(1,1,1) gc.setColor(1,1,1)
@@ -122,11 +121,12 @@ local function hide_noRoom()return #NET.roomList==0 end
scene.widgetList={ scene.widgetList={
WIDGET.newText{name="refreshing",x=640,y=255,font=45,hide=function()return not NET.getlock("fetchRoom")end}, WIDGET.newText{name="refreshing",x=640,y=255,font=45,hide=function()return not NET.getlock("fetchRoom")end},
WIDGET.newText{name="noRoom", x=640,y=260,font=40,hide=function()return #NET.roomList>0 or NET.getlock("fetchRoom")end}, WIDGET.newText{name="noRoom", x=640,y=260,font=40,hide=function()return #NET.roomList>0 or NET.getlock("fetchRoom")end},
WIDGET.newKey{name="refresh", x=240,y=620,w=140,h=140,font=35,code=fetchRoom, hide=function()return fetchTimer>3.26 end}, WIDGET.newKey{name="refresh", x=130,y=620,w=140,h=140,font=35,code=fetchRoom, hide=function()return fetchTimer>3.26 end},
WIDGET.newKey{name="new", x=440,y=620,w=140,h=140,font=25,code=pressKey"n"}, WIDGET.newKey{name="new", x=330,y=620,w=140,h=140,font=20,code=pressKey"n"},
WIDGET.newKey{name="join", x=640,y=620,w=140,h=140,font=40,code=pressKey"return", hide=hide_noRoom}, WIDGET.newKey{name="new2", x=530,y=620,w=140,h=140,font=20,code=pressKey"m"},
WIDGET.newKey{name="up", x=840,y=585,w=140,h=70,font=40,code=pressKey"up", hide=hide_noRoom}, WIDGET.newKey{name="join", x=730,y=620,w=140,h=140,font=40,code=pressKey"return", hide=hide_noRoom},
WIDGET.newKey{name="down", x=840,y=655,w=140,h=70,font=40,code=pressKey"down", hide=hide_noRoom}, WIDGET.newKey{name="up", x=930,y=585,w=140,h=70,font=40,code=pressKey"up", hide=hide_noRoom},
WIDGET.newKey{name="down", x=930,y=655,w=140,h=70,font=40,code=pressKey"down", hide=hide_noRoom},
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene}, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
} }