Resolve problem list worlds
parent
443a202453
commit
6c2b56ec94
|
@ -262,28 +262,28 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_change(type, old_tab, new_tab)
|
local on_change
|
||||||
local buttonbar = ui.find_by_name("game_button_bar")
|
if enable_gamebar then
|
||||||
|
function on_change(type, old_tab, new_tab)
|
||||||
|
if (type == "ENTER") then
|
||||||
|
local game = current_game()
|
||||||
|
|
||||||
if ( buttonbar == nil ) then
|
if game then
|
||||||
singleplayer_refresh_gamebar()
|
menudata.worldlist:set_filtercriteria(game.id)
|
||||||
buttonbar = ui.find_by_name("game_button_bar")
|
core.set_topleft_text(game.name)
|
||||||
end
|
mm_texture.update("singleplayer",game)
|
||||||
|
end
|
||||||
|
|
||||||
if (type == "ENTER") then
|
singleplayer_refresh_gamebar()
|
||||||
local game = current_game()
|
ui.find_by_name("game_button_bar"):show()
|
||||||
|
else
|
||||||
if game then
|
menudata.worldlist:set_filtercriteria(nil)
|
||||||
menudata.worldlist:set_filtercriteria(game.id)
|
local gamebar = ui.find_by_name("game_button_bar")
|
||||||
core.set_topleft_text(game.name)
|
if gamebar then
|
||||||
mm_texture.update("singleplayer",game)
|
end
|
||||||
|
core.set_topleft_text("")
|
||||||
|
mm_texture.update(new_tab,nil)
|
||||||
end
|
end
|
||||||
buttonbar:hide()
|
|
||||||
else
|
|
||||||
menudata.worldlist:set_filtercriteria(nil)
|
|
||||||
buttonbar:hide()
|
|
||||||
core.set_topleft_text("")
|
|
||||||
mm_texture.update(new_tab,nil)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue