Changeset 10446
- Timestamp:
- May 21, 2015, 1:19:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/multiplayerFS15/data/gui/scripts/MultiplayerMenu.lua
r10334 r10446 70 70 if choice then 71 71 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 72 destination = P.serverList[index][ 2]72 destination = P.serverList[index][1] 73 73 else 74 74 return … … 94 94 local serverip = "" 95 95 local serverrtt = "" 96 local playernumber = "" 96 97 while true do 97 98 servername = discovery:getServerListItemName(index) … … 103 104 break 104 105 end 105 serverrtt = discovery:getServerListItemRTT(index) 106 --serverrtt = discovery:getServerListItemRTT(index) 107 playernumber = discovery:getServerListItemPlayerNumber(index) 106 108 107 table.insert(P.serverList, {server name, serverip, serverrtt})109 table.insert(P.serverList, {serverip, servername, playernumber}) 108 110 index = index + 1 109 111 end 110 112 index = 1 111 113 for k,v in pairs(P.serverList) do 112 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] .. " Ping: " .. v[3] .."ms")114 local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3]) 113 115 item:setID(index) 114 116 index = index + 1 … … 129 131 local serverip = "" 130 132 local serverrtt = "" 133 local playernumber = "" 131 134 while true do 132 135 servername = discovery:getServerListItemName(index) … … 138 141 break 139 142 end 140 serverrtt = discovery:getServerListItemRTT(index) 143 --serverrtt = discovery:getServerListItemRTT(index) 144 playernumber = discovery:getServerListItemPlayerNumber(index) 141 145 142 table.insert(P.serverList, {server name, serverip, serverrtt})146 table.insert(P.serverList, {serverip, servername, playernumber}) 143 147 index = index + 1 144 148 end 145 149 index = 1 146 150 for k,v in pairs(P.serverList) do 147 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] .. " Ping: " .. v[3] .."ms")151 local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3]) 148 152 item:setID(index) 149 153 index = index + 1
Note: See TracChangeset
for help on using the changeset viewer.