Newer
Older
local scriptpath = engine.get_scriptdir()
mt_color_grey = "#AAAAAA"
mt_color_blue = "#0000DD"
mt_color_green = "#00DD00"
mt_color_dark_green = "#003300"
dofile(scriptpath .. DIR_DELIM .. "modmgr.lua")
dofile(scriptpath .. DIR_DELIM .. "modstore.lua")
dofile(scriptpath .. DIR_DELIM .. "gamemgr.lua")
local menu = {}
local tabbuilder = {}
local menubar = {}
--------------------------------------------------------------------------------
function render_favourite(spec,render_details)
local text = ""
if spec.name ~= nil then
-- if spec.description ~= nil and
-- fs_escape_string(spec.description):trim() ~= "" then
-- text = text .. " (" .. fs_escape_string(spec.description) .. ")"
-- end
else
if spec.address ~= nil then
text = text .. spec.address:trim()
end
end
if spec.port ~= nil and
spec.port ~= 30000 then
text = text .. ":" .. spec.port
end
if not render_details then
return text
end
local details = ""
if spec.password == true then
end
if spec.creative then
details = details .. "C"
else
end
if spec.damage then
details = details .. "D"
else
end
if spec.pvp then
details = details .. "P"
else
return fs_escape_string(details) .. text
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
end
--------------------------------------------------------------------------------
os.tempfolder = function()
local filetocheck = os.tmpname()
os.remove(filetocheck)
local randname = "MTTempModFolder_" .. math.random(0,10000)
if DIR_DELIM == "\\" then
local tempfolder = os.getenv("TEMP")
return tempfolder .. filetocheck
else
local backstring = filetocheck:reverse()
return filetocheck:sub(0,filetocheck:len()-backstring:find(DIR_DELIM)+1) ..randname
end
end
--------------------------------------------------------------------------------
function cleanup_path(temppath)
local parts = temppath:split("-")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. "_"
end
temppath = temppath .. parts[i]
end
parts = temppath:split(".")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. "_"
end
temppath = temppath .. parts[i]
end
parts = temppath:split("'")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. ""
end
temppath = temppath .. parts[i]
end
parts = temppath:split(" ")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath
end
temppath = temppath .. parts[i]
end
return temppath
end
--------------------------------------------------------------------------------
function menu.set_texture(identifier,gamedetails)
local texture_set = false
if menu.texturepack ~= nil and gamedetails ~= nil then
local path = menu.basetexturedir ..
gamedetails.id .. "_menu_" .. identifier .. ".png"
if engine.set_background(identifier,path) then
texture_set = true
end
end
if not texture_set and gamedetails ~= nil then
local path = gamedetails.path .. DIR_DELIM .."menu" ..
DIR_DELIM .. identifier .. ".png"
if engine.set_background(identifier,path) then
texture_set = true
end
end
if not texture_set then
local path = menu.basetexturedir .. DIR_DELIM .."menu_" ..
identifier .. ".png"
if engine.set_background(identifier,path) then
texture_set = true
end
end
if not texture_set then
local path = menu.defaulttexturedir .. DIR_DELIM .."menu_" ..
identifier .. ".png"
engine.set_background(identifier,path)
end
end
--------------------------------------------------------------------------------
function menu.update_gametype()
if (menu.game_last_check == nil or
menu.game_last_check ~= menu.last_game) and
tabbuilder.current_tab == "singleplayer" then
local gamedetails = menu.lastgame()
engine.set_topleft_text(gamedetails.name)
filterlist.set_filtercriteria(worldlist,gamedetails.id)
local background_set = false
if menu.texturepack ~= nil then
local path_background_texture = menu.basetexturedir ..
gamedetails.id .. "_menu_background.png"
if engine.set_background("background",path_background_texture) then
background_set = true
engine.set_clouds(false)
end
if not background_set then
local path_background_texture = gamedetails.path .. DIR_DELIM .."menu" ..
DIR_DELIM .. "background.png"
if engine.set_background("background",path_background_texture) then
background_set = true
engine.set_clouds(false)
end
end
if not background_set then
engine.set_clouds(true)
end
menu.set_texture("overlay",gamedetails)
menu.set_texture("header",gamedetails)
menu.set_texture("footer",gamedetails)
menu.game_last_check = menu.last_game
else
if menu.game_last_check ~= menu.last_game then
menu.game_last_check = menu.last_game
menu.reset_gametype()
end
end
end
--------------------------------------------------------------------------------
function menu.reset_gametype()
filterlist.set_filtercriteria(worldlist,nil)
local path_background_texture = menu.basetexturedir .. "menu_background.png"
if engine.set_background("background",path_background_texture) then
background_set = true
engine.set_clouds(false)
else
engine.set_clouds(true)
end
menu.set_texture("overlay",nil)
menu.set_texture("header",nil)
menu.set_texture("footer",nil)
engine.set_topleft_text("")
end
--------------------------------------------------------------------------------
function get_last_folder(text,count)
local parts = text:split(DIR_DELIM)
if count == nil then
return parts[#parts]
end
local retval = ""
for i=1,count,1 do
retval = retval .. parts[#parts - (count-i)] .. DIR_DELIM
end
return retval
end
--------------------------------------------------------------------------------
function init_globals()
--init gamedata
gamedata.worldindex = 0
worldlist = filterlist.create(
engine.get_worlds,
compare_worlds,
function(element,uid)
if element.name == uid then
return true
end
return false
end, --unique id compare fct
function(element,gameid)
if element.gameid == gameid then
return true
end
return false
end --filter fct
)
filterlist.add_sort_mechanism(worldlist,"alphabetic",sort_worlds_alphabetic)
filterlist.set_sortmode(worldlist,"alphabetic")
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
end
--------------------------------------------------------------------------------
function identify_filetype(name)
if name:sub(-3):lower() == "zip" then
return {
name = name,
type = "zip"
}
end
if name:sub(-6):lower() == "tar.gz" or
name:sub(-3):lower() == "tgz"then
return {
name = name,
type = "tgz"
}
end
if name:sub(-6):lower() == "tar.bz2" then
return {
name = name,
type = "tbz"
}
end
if name:sub(-2):lower() == "7z" then
return {
name = name,
type = "7z"
}
end
return {
name = name,
type = "ukn"
}
end
--------------------------------------------------------------------------------
function update_menu()
local formspec = "size[12,5.2]"
-- handle errors
if gamedata.errormessage ~= nil then
formspec = formspec ..
"field[1,2;10,2;;ERROR: " ..
gamedata.errormessage ..
";]"..
"button[4.5,4.2;3,0.5;btn_error_confirm;Ok]"
else
formspec = formspec .. tabbuilder.gettab()
end
engine.update_formspec(formspec)
end
--------------------------------------------------------------------------------
local current_worldlist = filterlist.get_list(worldlist)
for i,v in ipairs(current_worldlist) do
if retval ~= "" then
retval = retval ..","
end
--------------------------------------------------------------------------------
function menu.init()
--init menu data
gamemgr.update_gamelist()
menu.last_game = tonumber(engine.setting_get("main_menu_last_game_idx"))
if type(menu.last_game) ~= "number" then
menu.last_game = 1
end
if engine.setting_getbool("public_serverlist") then
menu.favorites = engine.get_favorites("online")
else
menu.favorites = engine.get_favorites("local")
end
menu.defaulttexturedir = engine.get_gamepath() .. DIR_DELIM .. ".." ..
DIR_DELIM .. "textures" .. DIR_DELIM .. "base" ..
DIR_DELIM .. "pack" .. DIR_DELIM
menu.basetexturedir = menu.defaulttexturedir
menu.texturepack = engine.setting_get("texture_path")
if menu.texturepack ~= nil then
menu.basetexturedir = menu.texturepack .. DIR_DELIM
end
end
--------------------------------------------------------------------------------
function menu.lastgame()
if menu.last_game > 0 and menu.last_game <= #gamemgr.games then
return gamemgr.games[menu.last_game]
end
if #gamemgr.games >= 1 then
menu.last_game = 1
return gamemgr.games[menu.last_game]
end
--error case!!
return nil
end
--------------------------------------------------------------------------------
local current_world = filterlist.get_raw_element(worldlist,
engine.setting_get("mainmenu_last_selected_world")
)
if current_world == nil then
return
for i=1,#gamemgr.games,1 do
if gamemgr.games[i].id == current_world.gameid then
menu.last_game = i
engine.setting_set("main_menu_last_game_idx",menu.last_game)
break
end
end
end
--------------------------------------------------------------------------------
function menu.handle_key_up_down(fields,textlist,settingname)
if fields["key_up"] then
local oldidx = engine.get_textlist_index(textlist)
if oldidx > 1 then
local newidx = oldidx -1
engine.setting_set(settingname,
filterlist.get_engine_index(worldlist,newidx))
end
if fields["key_down"] then
local oldidx = engine.get_textlist_index(textlist)
if oldidx < filterlist.size(worldlist) then
filterlist.get_engine_index(worldlist,newidx))
--------------------------------------------------------------------------------
function menubar.handle_buttons(fields)
for i=1,#menubar.buttons,1 do
if fields[menubar.buttons[i].btn_name] ~= nil then
menu.last_game = menubar.buttons[i].index
engine.setting_set("main_menu_last_game_idx",menu.last_game)
menu.update_gametype()
end
end
end
--------------------------------------------------------------------------------
function menubar.refresh()
menubar.formspec = "box[-0.3,5.625;12.4,1.3;000000]" ..
"box[-0.3,5.6;12.4,0.05;FFFFFF]"
local maxbuttons = #gamemgr.games
end
for i=1,maxbuttons,1 do
local btn_name = "menubar_btn_" .. gamemgr.games[i].id
if gamemgr.games[i].menuicon_path ~= nil and
gamemgr.games[i].menuicon_path ~= "" then
menubar.formspec = menubar.formspec ..
gamemgr.games[i].menuicon_path .. ";" .. btn_name .. ";;true;false]"
else
local part1 = gamemgr.games[i].id:sub(1,5)
local part2 = gamemgr.games[i].id:sub(6,10)
local part3 = gamemgr.games[i].id:sub(11)
local text = part1 .. "\n" .. part2
if part3 ~= nil and
part3 ~= "" then
text = text .. "\n" .. part3
end
menubar.formspec = menubar.formspec ..
"image_button[" .. buttonpos .. ",5.7;1.3,1.3;;" ..btn_name ..
";" .. text .. ";true;true]"
end
local toadd = {
btn_name = btn_name,
index = i,
}
table.insert(menubar.buttons,toadd)
end
end
--------------------------------------------------------------------------------
function tabbuilder.dialog_create_world()
kwolekr
committed
local mapgens = {"v6", "v7", "indev", "singlenode", "math"}
local current_mg = engine.setting_get("mg_name")
local mglist = ""
local selindex = 1
local i = 1
for k,v in pairs(mapgens) do
if current_mg == v then
selindex = i
end
i = i + 1
mglist = mglist .. v .. ","
end
mglist = mglist:sub(1, -2)
local retval =
"label[2,0;World name]"..
"label[2,1;Mapgen]"..
"field[4.5,0.4;6,0.5;te_world_name;;]" ..
"label[2,2;Game]"..
"button[5,4.5;2.6,0.5;world_create_confirm;Create]" ..
"button[7.5,4.5;2.8,0.5;world_create_cancel;Cancel]" ..
kwolekr
committed
"dropdown[4.2,1;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" ..
"textlist[4.2,1.9;5.8,2.3;games;" ..
gamemgr.gamelist() ..
";" .. menu.last_game .. ";true]"
return retval
end
--------------------------------------------------------------------------------
function tabbuilder.dialog_delete_world()
return "label[2,2;Delete World \"" .. filterlist.get_raw_list(worldlist)[menu.world_to_del].name .. "\"?]"..
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
"button[3.5,4.2;2.6,0.5;world_delete_confirm;Yes]" ..
"button[6,4.2;2.8,0.5;world_delete_cancel;No]"
end
--------------------------------------------------------------------------------
function tabbuilder.gettab()
local retval = ""
if tabbuilder.show_buttons then
retval = retval .. tabbuilder.tab_header()
end
if tabbuilder.current_tab == "singleplayer" then
retval = retval .. tabbuilder.tab_singleplayer()
end
if tabbuilder.current_tab == "multiplayer" then
retval = retval .. tabbuilder.tab_multiplayer()
end
if tabbuilder.current_tab == "server" then
retval = retval .. tabbuilder.tab_server()
end
if tabbuilder.current_tab == "settings" then
retval = retval .. tabbuilder.tab_settings()
end
if tabbuilder.current_tab == "credits" then
retval = retval .. tabbuilder.tab_credits()
end
if tabbuilder.current_tab == "dialog_create_world" then
retval = retval .. tabbuilder.dialog_create_world()
end
if tabbuilder.current_tab == "dialog_delete_world" then
retval = retval .. tabbuilder.dialog_delete_world()
end
retval = retval .. modmgr.gettab(tabbuilder.current_tab)
retval = retval .. gamemgr.gettab(tabbuilder.current_tab)
retval = retval .. modstore.gettab(tabbuilder.current_tab)
return retval
end
--------------------------------------------------------------------------------
function tabbuilder.handle_create_world_buttons(fields)
if fields["world_create_confirm"] or
fields["key_enter"] then
local worldname = fields["te_world_name"]
local gameindex = engine.get_textlist_index("games")
if gameindex > 0 and
worldname ~= "" then
if not filterlist.uid_exists(worldlist,worldname) then
engine.setting_set("mg_name",fields["dd_mapgen"])
message = engine.create_world(worldname,gameindex)
else
message = "A world named \"" .. worldname .. "\" already exists"
end
if message ~= nil then
gamedata.errormessage = message
else
menu.last_game = gameindex
engine.setting_set("main_menu_last_game_idx",gameindex)
filterlist.refresh(worldlist)
filterlist.engine_index_by_uid(worldlist,worldname))
end
else
gamedata.errormessage = "No worldname given or no game selected"
end
end
if fields["games"] then
tabbuilder.skipformupdate = true
return
end
tabbuilder.is_dialog = false
tabbuilder.show_buttons = true
tabbuilder.current_tab = engine.setting_get("main_menu_tab")
end
--------------------------------------------------------------------------------
function tabbuilder.handle_delete_world_buttons(fields)
if fields["world_delete_confirm"] then
menu.world_to_del <= #filterlist.get_raw_list(worldlist) then
engine.delete_world(menu.world_to_del)
menu.world_to_del = 0
filterlist.refresh(worldlist)
end
end
tabbuilder.is_dialog = false
tabbuilder.show_buttons = true
tabbuilder.current_tab = engine.setting_get("main_menu_tab")
end
--------------------------------------------------------------------------------
function tabbuilder.handle_multiplayer_buttons(fields)
if fields["te_name"] ~= nil then
gamedata.playername = fields["te_name"]
engine.setting_set("name", fields["te_name"])
end
if fields["favourites"] ~= nil then
local event = explode_textlist_event(fields["favourites"])
if event.typ == "DCL" then
gamedata.address = menu.favorites[event.index].address
gamedata.port = menu.favorites[event.index].port
gamedata.playername = fields["te_name"]
if fields["te_pwd"] ~= nil then
gamedata.password = fields["te_pwd"]
end
if menu.favorites ~= nil then
gamedata.servername = menu.favorites[event.index].name
gamedata.serverdescription = menu.favorites[event.index].description
end
if gamedata.address ~= nil and
gamedata.port ~= nil then
engine.start()
end
end
if event.typ == "CHG" then
local port = menu.favorites[event.index].port
if address ~= nil and
port ~= nil then
engine.setting_set("address",address)
engine.setting_set("port",port)
end
if fields["key_up"] ~= nil or
fields["key_down"] ~= nil then
local fav_idx = engine.get_textlist_index("favourites")
if fields["key_up"] ~= nil and fav_idx > 1 then
fav_idx = fav_idx -1
else if fields["key_down"] and fav_idx < #menu.favorites then
fav_idx = fav_idx +1
end end
local address = menu.favorites[fav_idx].address
local port = menu.favorites[fav_idx].port
if address ~= nil and
port ~= nil then
engine.setting_set("address",address)
engine.setting_set("port",port)
end
menu.fav_selected = fav_idx
return
end
if fields["cb_public_serverlist"] ~= nil then
engine.setting_setbool("public_serverlist",
tabbuilder.tobool(fields["cb_public_serverlist"]))
if engine.setting_getbool("public_serverlist") then
menu.favorites = engine.get_favorites("online")
else
menu.favorites = engine.get_favorites("local")
end
end
if fields["btn_delete_favorite"] ~= nil then
local current_favourite = engine.get_textlist_index("favourites")
engine.delete_favorite(current_favourite)
menu.favorites = engine.get_favorites()
engine.setting_set("address","")
engine.setting_get("port","")
return
end
if fields["btn_mp_connect"] ~= nil or
fields["key_enter"] then
gamedata.playername = fields["te_name"]
gamedata.password = fields["te_pwd"]
gamedata.address = fields["te_address"]
gamedata.port = fields["te_port"]
local fav_idx = engine.get_textlist_index("favourites")
if fav_idx > 0 and fav_idx <= #menu.favorites and
menu.favorites[fav_idx].address == fields["te_address"] and
menu.favorites[fav_idx].port == fields["te_port"] then
gamedata.servername = menu.favorites[fav_idx].name
gamedata.serverdescription = menu.favorites[fav_idx].description
else
gamedata.servername = ""
gamedata.serverdescription = ""
end
engine.start()
return
end
end
--------------------------------------------------------------------------------
function tabbuilder.handle_server_buttons(fields)
local world_doubleclick = false
if fields["srv_worlds"] ~= nil then
local event = explode_textlist_event(fields["srv_worlds"])
filterlist.get_engine_index(worldlist,engine.get_textlist_index("srv_worlds")))
menu.handle_key_up_down(fields,"srv_worlds","mainmenu_last_selected_world")
if fields["cb_creative_mode"] then
engine.setting_setbool("creative_mode",tabbuilder.tobool(fields["cb_creative_mode"]))
end
if fields["cb_enable_damage"] then
engine.setting_setbool("enable_damage",tabbuilder.tobool(fields["cb_enable_damage"]))
end
if fields["cb_server_announce"] then
engine.setting_setbool("server_announce",tabbuilder.tobool(fields["cb_server_announce"]))
end
if fields["start_server"] ~= nil or
local selected = engine.get_textlist_index("srv_worlds")
if selected > 0 then
gamedata.playername = fields["te_playername"]
gamedata.port = fields["te_serverport"]
gamedata.selected_world = filterlist.get_engine_index(worldlist,selected)
menu.update_last_game(gamedata.selected_world)
engine.start()
end
end
if fields["world_create"] ~= nil then
tabbuilder.current_tab = "dialog_create_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
end
if fields["world_delete"] ~= nil then
local selected = engine.get_textlist_index("srv_worlds")
selected <= filterlist.size(worldlist) then
local world = filterlist.get_list(worldlist)[selected]
if world ~= nil and
world.name ~= nil and
world.name ~= "" then
menu.world_to_del = filterlist.get_engine_index(worldlist,selected)
tabbuilder.current_tab = "dialog_delete_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
else
end
end
end
if fields["world_configure"] ~= nil then
selected = engine.get_textlist_index("srv_worlds")
if selected > 0 then
modmgr.world_config_selected_world = filterlist.get_engine_index(worldlist,selected)
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
if modmgr.init_worldconfig() then
tabbuilder.current_tab = "dialog_configure_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
end
end
end
end
--------------------------------------------------------------------------------
function tabbuilder.tobool(text)
if text == "true" then
return true
else
return false
end
end
--------------------------------------------------------------------------------
function tabbuilder.handle_settings_buttons(fields)
if fields["cb_fancy_trees"] then
engine.setting_setbool("new_style_leaves",tabbuilder.tobool(fields["cb_fancy_trees"]))
end
if fields["cb_smooth_lighting"] then
engine.setting_setbool("smooth_lighting",tabbuilder.tobool(fields["cb_smooth_lighting"]))
end
if fields["cb_3d_clouds"] then
engine.setting_setbool("enable_3d_clouds",tabbuilder.tobool(fields["cb_3d_clouds"]))
end
if fields["cb_opaque_water"] then
engine.setting_setbool("opaque_water",tabbuilder.tobool(fields["cb_opaque_water"]))
end
if fields["cb_mipmapping"] then
engine.setting_setbool("mip_map",tabbuilder.tobool(fields["cb_mipmapping"]))
end
if fields["cb_anisotrophic"] then
engine.setting_setbool("anisotropic_filter",tabbuilder.tobool(fields["cb_anisotrophic"]))
end
if fields["cb_bilinear"] then
engine.setting_setbool("bilinear_filter",tabbuilder.tobool(fields["cb_bilinear"]))
end
if fields["cb_trilinear"] then
engine.setting_setbool("trilinear_filter",tabbuilder.tobool(fields["cb_trilinear"]))
end
if fields["cb_shaders"] then
engine.setting_setbool("enable_shaders",tabbuilder.tobool(fields["cb_shaders"]))
end
if fields["cb_pre_ivis"] then
engine.setting_setbool("preload_item_visuals",tabbuilder.tobool(fields["cb_pre_ivis"]))
end
if fields["cb_particles"] then
engine.setting_setbool("enable_particles",tabbuilder.tobool(fields["cb_particles"]))
end
if fields["cb_finite_liquid"] then
engine.setting_setbool("liquid_finite",tabbuilder.tobool(fields["cb_finite_liquid"]))
end
if fields["btn_change_keys"] ~= nil then
engine.show_keys_menu()
end
end
--------------------------------------------------------------------------------
function tabbuilder.handle_singleplayer_buttons(fields)
local world_doubleclick = false
if fields["sp_worlds"] ~= nil then
local event = explode_textlist_event(fields["sp_worlds"])
if event.typ == "DCL" then
world_doubleclick = true
end
filterlist.get_engine_index(worldlist,engine.get_textlist_index("sp_worlds")))
menu.handle_key_up_down(fields,"sp_worlds","mainmenu_last_selected_world")
if fields["cb_creative_mode"] then
engine.setting_setbool("creative_mode",tabbuilder.tobool(fields["cb_creative_mode"]))
end
if fields["cb_enable_damage"] then
engine.setting_setbool("enable_damage",tabbuilder.tobool(fields["cb_enable_damage"]))
end
if fields["play"] ~= nil or
local selected = engine.get_textlist_index("sp_worlds")
if selected > 0 then
gamedata.selected_world = filterlist.get_engine_index(worldlist,selected)
gamedata.singleplayer = true
menu.update_last_game(gamedata.selected_world)
engine.start()
end
end
if fields["world_create"] ~= nil then
tabbuilder.current_tab = "dialog_create_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
end
if fields["world_delete"] ~= nil then
local selected = engine.get_textlist_index("sp_worlds")
selected <= filterlist.size(worldlist) then
local world = filterlist.get_list(worldlist)[selected]
if world ~= nil and
world.name ~= nil and
world.name ~= "" then
menu.world_to_del = filterlist.get_engine_index(worldlist,selected)
tabbuilder.current_tab = "dialog_delete_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
else
end
end
end
if fields["world_configure"] ~= nil then
selected = engine.get_textlist_index("sp_worlds")
if selected > 0 then
modmgr.world_config_selected_world = filterlist.get_engine_index(worldlist,selected)
if modmgr.init_worldconfig() then
tabbuilder.current_tab = "dialog_configure_world"
tabbuilder.is_dialog = true
tabbuilder.show_buttons = false
end
end
end
end
--------------------------------------------------------------------------------
function tabbuilder.tab_header()