Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2015, 1:19:28 PM (10 years ago)
Author:
frovelli
Message:

Display bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/multiplayerFS15/data/gui/scripts/MultiplayerMenu.lua

    r10334 r10446  
    7070    if choice then
    7171        local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
    72         destination = P.serverList[index][2]
     72        destination = P.serverList[index][1]
    7373    else
    7474        return
     
    9494        local serverip = ""
    9595        local serverrtt = ""
     96        local playernumber = ""
    9697        while true do
    9798            servername = discovery:getServerListItemName(index)
     
    103104                break
    104105            end
    105             serverrtt = discovery:getServerListItemRTT(index)
     106            --serverrtt = discovery:getServerListItemRTT(index)
     107            playernumber = discovery:getServerListItemPlayerNumber(index)
    106108
    107             table.insert(P.serverList, {servername, serverip, serverrtt})
     109            table.insert(P.serverList, {serverip, servername, playernumber})
    108110            index = index + 1
    109111        end
    110112        index = 1
    111113        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])
    113115            item:setID(index)
    114116            index = index + 1
     
    129131        local serverip = ""
    130132        local serverrtt = ""
     133        local playernumber = ""
    131134        while true do
    132135            servername = discovery:getServerListItemName(index)
     
    138141                break
    139142            end
    140             serverrtt = discovery:getServerListItemRTT(index)
     143            --serverrtt = discovery:getServerListItemRTT(index)
     144            playernumber = discovery:getServerListItemPlayerNumber(index)
    141145
    142             table.insert(P.serverList, {servername, serverip, serverrtt})
     146            table.insert(P.serverList, {serverip, servername, playernumber})
    143147            index = index + 1
    144148        end
    145149        index = 1
    146150        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])
    148152            item:setID(index)
    149153            index = index + 1
Note: See TracChangeset for help on using the changeset viewer.