Changeset 10334 for code/branches/multiplayerFS15/data
- Timestamp:
- Mar 26, 2015, 1:38:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/multiplayerFS15/data/gui/scripts/MultiplayerMenu.lua
r8858 r10334 93 93 local servername = "" 94 94 local serverip = "" 95 local serverrtt = "" 95 96 while true do 96 97 servername = discovery:getServerListItemName(index) … … 102 103 break 103 104 end 104 table.insert(P.serverList, {servername, serverip}) 105 serverrtt = discovery:getServerListItemRTT(index) 106 107 table.insert(P.serverList, {servername, serverip, serverrtt}) 105 108 index = index + 1 106 109 end 107 110 index = 1 108 111 for k,v in pairs(P.serverList) do 109 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )112 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] .. " Ping: " .. v[3] .."ms" ) 110 113 item:setID(index) 111 114 index = index + 1 … … 125 128 local servername = "" 126 129 local serverip = "" 130 local serverrtt = "" 127 131 while true do 128 132 servername = discovery:getServerListItemName(index) … … 134 138 break 135 139 end 136 table.insert(P.serverList, {servername, serverip}) 140 serverrtt = discovery:getServerListItemRTT(index) 141 142 table.insert(P.serverList, {servername, serverip, serverrtt}) 137 143 index = index + 1 138 144 end 139 145 index = 1 140 146 for k,v in pairs(P.serverList) do 141 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )147 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] .. " Ping: " .. v[3] .."ms" ) 142 148 item:setID(index) 143 149 index = index + 1 … … 150 156 151 157 return P 152
Note: See TracChangeset
for help on using the changeset viewer.