Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't show flags in local favorites
  • Loading branch information
sapier authored and PilzAdam committed Jul 12, 2013
1 parent a0771d0 commit 288948e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions builtin/mainmenu.lua
Expand Up @@ -12,7 +12,7 @@ local tabbuilder = {}
local menubar = {}

--------------------------------------------------------------------------------
function render_favourite(spec)
function render_favourite(spec,render_details)
local text = ""

if spec.name ~= nil then
Expand All @@ -28,6 +28,10 @@ function render_favourite(spec)
end
end

if not render_details then
return text
end

local details = ""
if spec.password == true then
details = details .. "*"
Expand Down Expand Up @@ -1081,11 +1085,13 @@ function tabbuilder.tab_multiplayer()
";]" ..
"textlist[1,0.35;7.5,3.35;favourites;"

local render_details = engine.setting_getbool("public_serverlist")

if #menu.favorites > 0 then
retval = retval .. render_favourite(menu.favorites[1])
retval = retval .. render_favourite(menu.favorites[1],render_details)

for i=2,#menu.favorites,1 do
retval = retval .. "," .. render_favourite(menu.favorites[i])
retval = retval .. "," .. render_favourite(menu.favorites[i],render_details)
end
end

Expand Down

0 comments on commit 288948e

Please sign in to comment.