main menu tweaks

This commit is contained in:
4aiman 2015-04-27 22:03:59 +03:00
parent abca1d9c91
commit d88f63f62e
13 changed files with 80 additions and 78 deletions

View File

@ -25,7 +25,7 @@ local function get_formspec(data)
local mod = data.list:get_list()[data.selected_mod]
local retval =
"size[11,6.5,true]" ..
"size[11,6.5,false]" ..
"label[0.5,-0.25;" .. fgettext("World:") .. "]" ..
"label[1.75,-0.25;" .. data.worldspec.name .. "]"
@ -51,8 +51,8 @@ local function get_formspec(data)
"label[0,1;" .. fgettext("Depends:") .. "]" ..
"textlist[0,1.5;5,4.25;world_config_depends;" ..
modmgr.get_dependencies(mod.path) .. ";0]" ..
"image_button[9.25,6.35;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_config_world_save;" .. fgettext("Save") .. "]" ..
"image_button[7.4,6.35;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_config_world_cancel;" .. fgettext("Cancel") .. "]"
"image_button[9.25,6.35;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_config_world_save;" .. fgettext("Save") .. "]" ..
"image_button[7.4,6.35;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_config_world_cancel;" .. fgettext("Cancel") .. "]"
if mod ~= nil and mod.name ~= "" and mod.typ ~= "game_mod" then
if mod.is_modpack then
@ -68,9 +68,9 @@ local function get_formspec(data)
end
if all_enabled == false then
retval = retval .. "image_button[5.5,-0.125;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_enable;" .. fgettext("Enable MP") .. "]"
retval = retval .. "image_button[5.5,-0.125;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_enable;" .. fgettext("Enable MP") .. "]"
else
retval = retval .. "image_button[5.5,-0.125;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_disable;" .. fgettext("Disable MP") .. "]"
retval = retval .. "image_button[5.5,-0.125;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_disable;" .. fgettext("Disable MP") .. "]"
end
else
if mod.enabled then
@ -82,7 +82,7 @@ local function get_formspec(data)
end
retval = retval ..
"image_button[8.5,-0.125;2.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_all_mods;" .. fgettext("Enable all") .. "]" ..
"image_button[8.5,-0.125;2.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_all_mods;" .. fgettext("Enable all") .. "]" ..
"textlist[5.5,0.5;5.5,5.75;world_config_modlist;"
retval = retval .. modmgr.render_modlist(data.list)

View File

@ -46,7 +46,7 @@ local function create_world_formspec(dialogdata)
current_seed = core.formspec_escape(current_seed)
local retval =
"size[12,6,true]" ..
"size[12,6,false]" ..
"label[2,0;" .. fgettext("World name") .. "]"..
"field[4.5,0.4;6,0.5;te_world_name;;]" ..
@ -60,8 +60,8 @@ local function create_world_formspec(dialogdata)
"textlist[4.2,3;5.8,2.3;games;" .. gamemgr.gamelist() ..
";" .. gameidx .. ";true]" ..
"image_button[5,5.5;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create_confirm;" .. fgettext("Create") .. "]" ..
"image_button[7.5,5.5;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create_cancel;" .. fgettext("Cancel") .. "]"
"image_button[5,5.5;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create_confirm;" .. fgettext("Create") .. "]" ..
"image_button[7.5,5.5;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create_cancel;" .. fgettext("Cancel") .. "]"
if #gamemgr.games == 0 then
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..

View File

@ -22,10 +22,10 @@ local function delete_mod_formspec(dialogdata)
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
local retval =
"size[12.4,5,true]" ..
"size[12.4,5,false]" ..
"field[1.75,1;10,3;;" .. fgettext("Are you sure you want to delete \"$1\"?", dialogdata.mod.name) .. ";]"..
"image_button[4,4.2;1,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_delete_mod_confirm;" .. fgettext("Yes") .. "]" ..
"image_button[6.5,4.2;3,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_delete_mod_cancel;" .. fgettext("No of course not!") .. "]"
"image_button[4,4.2;1,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_delete_mod_confirm;" .. fgettext("Yes") .. "]" ..
"image_button[6.5,4.2;3,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_delete_mod_cancel;" .. fgettext("No of course not!") .. "]"
return retval
end

View File

@ -19,11 +19,11 @@
local function delete_world_formspec(dialogdata)
local retval =
"size[12,6,true]" ..
"size[12,6,false]" ..
"label[2,2;" ..
fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]"..
"image_button[3.5,4.2;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete_confirm;" .. fgettext("Yes").. "]" ..
"image_button[6,4.2;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete_cancel;" .. fgettext("No") .. "]"
"image_button[3.5,4.2;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete_confirm;" .. fgettext("Yes").. "]" ..
"image_button[6,4.2;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete_cancel;" .. fgettext("No") .. "]"
return retval
end

View File

@ -22,14 +22,14 @@ local function rename_modpack_formspec(dialogdata)
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
local retval =
"size[12.4,5,true]" ..
"size[12.4,5,false]" ..
"label[1.75,1;".. fgettext("Rename Modpack:") .. "]"..
"field[4.5,1.4;6,0.5;te_modpack_name;;" ..
dialogdata.mod.name ..
"]" ..
"image_button[5,4.2;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_rename_modpack_confirm;"..
"image_button[5,4.2;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_rename_modpack_confirm;"..
fgettext("Accept") .. "]" ..
"image_button[7.5,4.2;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_rename_modpack_cancel;"..
"image_button[7.5,4.2;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_rename_modpack_cancel;"..
fgettext("Cancel") .. "]"
return retval

View File

@ -61,8 +61,8 @@ end
--------------------------------------------------------------------------------
local function get_formspec2(tabview, name, tabdata)
local retval = ""
retval = retval .. "bgcolor[#00000000;false]"
local retval = 'size[12,5.2,false]'
retval = retval .. "bgcolor[#00000000;true]"
retval = retval .. "image_button[2.5,3.4;7,1;"..minetest.formspec_escape(mm_texture.basetexturedir) .. "menu_button.png;btn_show_multiplayer;" .. fgettext("Multiplayer") .. ";true;true;" .. minetest.formspec_escape(mm_texture.basetexturedir).."menu_button_b.png]"
retval = retval .. "image_button[2.5,4.8;7,1;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_show_options;".. fgettext("Options") .. ";true;true;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button_b.png]"
--retval = retval .. "image_button[8.5,4.8;1,1;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_show_help;?;true;true;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button_b.png]"
@ -76,7 +76,9 @@ local function get_formspec2(tabview, name, tabdata)
local ratio = xdiv/ydiv
--print(xdiv..' x '..ydiv..' = '..ratio)
math.randomseed(os.time())
--math.randomseed(os.time())
print(math.floor(si.window_width/53.33)+1)
core.setting_set('font_size', tostring(math.floor(si.window_width/53.33)+0.5))
--local rnd = 'image['.. 12*ratio ..','.. 1 .. ';6,0.5;'..minetest.formspec_escape(mm_texture.basetexturedir)..'ad_label'..tostring(math.random(1,14))..'.png]'
return retval --.. rnd
@ -170,7 +172,7 @@ local function init_globals()
-- Create main tabview
local tv_main = tabview_create("maintab",{x=12,y=5.2},{x=0,y=0})
local tv_main = tabview_create("maintab",{x=12,y=5.2},{x=-1,y=0})
tv_main:set_autosave_tab(false)
tv_main:add(tab_main)
tv_main:add(tab_singleplayer)

View File

@ -162,7 +162,7 @@ function modstore.successfulldialog(downloading_dlg)
retval = retval .. "label[0,0.75;" .. fgettext("Shortname:") .. "]"
retval = retval .. "label[3,0.75;" .. core.formspec_escape(modstore.lastmodentry.moddetails.basename) .. "]"
end
retval = retval .. "image_button[2.2,1.5;1.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_confirm_mod_successfull;" .. fgettext("Ok") .. "]"
retval = retval .. "image_button[2.2,1.5;1.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_confirm_mod_successfull;" .. fgettext("Ok") .. "]"
return retval
end,
function(this,fields)
@ -491,7 +491,7 @@ function modstore.getshortmodinfo(ypos,listentry,details)
if details.basename then
--install button
local buttony = ypos + 1.2
retval = retval .."image_button[9.1," .. buttony .. ";2.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_install_mod_" .. details.id .. ";"
retval = retval .."image_button[9.1," .. buttony .. ";2.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_install_mod_" .. details.id .. ";"
if modmgr.mod_exists(details.basename) then
retval = retval .. fgettext("re-Install") .."]"
@ -515,7 +515,7 @@ function modstore.getmodlist(list,yoffset)
local sb_y_start = 0.2 + yoffset
local sb_y_end = (modstore.modsperpage * 1.75) + ((modstore.modsperpage-1) * 0.15)
local close_button = "image_button[4," .. (sb_y_end + 0.3 + yoffset) ..
";4,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_close;" .. fgettext("Close store") .. "]"
";4,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_close;" .. fgettext("Close store") .. "]"
if #list.data == 0 then
return close_button
@ -529,9 +529,9 @@ function modstore.getmodlist(list,yoffset)
((sb_y_end -1.6)/(list.pagecount-1)) * list.page
scrollbar = scrollbar .. "box[11.6," ..scrollbarpos .. ";0.28,0.5;#32CD32]"
scrollbar = scrollbar .. "image_button[11.6," .. (sb_y_start)
.. ";0.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_page_up;^]"
.. ";0.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_page_up;^]"
scrollbar = scrollbar .. "image_button[11.6," .. (sb_y_start + sb_y_end - 0.5)
.. ";0.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_page_down;v]"
.. ";0.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_page_down;v]"
local retval = ""
@ -577,7 +577,7 @@ function modstore.getsearchpage(tabview, name, tabdata)
end
retval = retval ..
"image_button[9.5,0.2;2.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_search;".. fgettext("Search") .. "]" ..
"image_button[9.5,0.2;2.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore_search;".. fgettext("Search") .. "]" ..
"field[0.5,0.5;9,0.5;te_modstore_search;;" .. search .. "]"
retval = retval ..

View File

@ -36,7 +36,7 @@ local function get_formspec(tabview, name, tabdata)
-- "label[0.8,4.2;" .. fgettext("Add mod:") .. "]" ..
-- TODO Disabled due to upcoming release 0.4.8 and irrlicht messing up localization
-- "image_button[0.75,4.85;1.8,0.5;btn_mod_mgr_install_local;".. fgettext("Local install") .. "]" ..
"image_button[0,4.85;5.25,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore;".. fgettext("Online mod repository") .. "]"
"image_button[0,4.85;5.25,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_modstore;".. fgettext("Online mod repository") .. "]"
local selected_mod = nil
@ -89,9 +89,9 @@ local function get_formspec(tabview, name, tabdata)
if selected_mod.is_modpack then
retval = retval .. ";0]" ..
"image_button[10,4.85;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_rename_modpack;" ..
"image_button[10,4.85;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_rename_modpack;" ..
fgettext("Rename") .. "]"
retval = retval .. "image_button[5.5,4.85;4.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_delete_mod;"
retval = retval .. "image_button[5.5,4.85;4.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_delete_mod;"
.. fgettext("Uninstall selected modpack") .. "]"
else
--show dependencies
@ -102,7 +102,7 @@ local function get_formspec(tabview, name, tabdata)
retval = retval .. toadd .. ";0]"
retval = retval .. "image_button[5.5,4.85;4.5,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_delete_mod;"
retval = retval .. "image_button[5.5,4.85;4.5,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mod_mgr_delete_mod;"
.. fgettext("Uninstall selected mod") .. "]"
end
end

View File

@ -32,11 +32,11 @@ if not tabdata then tabdata = {} end
if not core.setting_getbool("public_serverlist") then
retval = retval ..
"image_button[8,4.9;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_delete_favorite;" .. fgettext("Delete") .. "]"
"image_button[8,4.9;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_delete_favorite;" .. fgettext("Delete") .. "]"
end
retval = retval ..
"image_button[10,4.9;2,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_connect;" .. fgettext("Connect") .. "]" ..
"image_button[10,4.9;2,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_mp_connect;" .. fgettext("Connect") .. "]" ..
"field[8,1.95;2.95,0.5;te_name;;" ..
core.formspec_escape(core.setting_get("name")) .. "]" ..
"pwdfield[10.78,1.95;1.77,0.5;te_pwd;]" ..
@ -85,7 +85,7 @@ if not tabdata then tabdata = {} end
retval = retval .. ";0]"
end
return 'size[12,5.2]'..retval
return 'size[12,5.4;false]'..retval
end
--------------------------------------------------------------------------------

View File

@ -23,18 +23,18 @@ local function get_formspec(tabview, name, tabdata)
)
local retval =
"image_button[4,4.15;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete;" .. fgettext("Delete") .. "]" ..
"image_button[6.5,4.15;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;" .. fgettext("New") .. "]" ..
"image_button[9.2,4.15;2.55,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;" .. fgettext("Configure") .. "]" ..
"image_button[8.5,4.95;3.25,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;start_server;" .. fgettext("Start Game") .. "]" ..
"image_button[4,4.15;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete;" .. fgettext("Delete") .. "]" ..
"image_button[6.5,4.15;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;" .. fgettext("New") .. "]" ..
"image_button[9.2,4.15;2.55,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;" .. fgettext("Configure") .. "]" ..
"image_button[8.5,4.95;3.25,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;start_server;" .. fgettext("Start Game") .. "]" ..
"label[4,-0.25;" .. fgettext("Select World:") .. "]" ..
"checkbox[0.25,0.15;cb_creative_mode;" .. fgettext("Creative Mode") .. ";" ..
dump(core.setting_getbool("creative_mode")) .. "]" ..
"checkbox[0.25,0.6;cb_enable_damage;" .. fgettext("Enable Damage") .. ";" ..
dump(core.setting_getbool("enable_damage")) .. "]" ..
"image_button[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png;b_single;;false;false]"..
"image_button[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_check.png;b_single;;false;false]"..
"image_button[0.3,1.3;3,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_trans.png;btn_single;Local Server;false;false]"..
"image[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png]"..
"image[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_check.png]"..
"image_button[0.8,1.3;3,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_trans.png;btn_single;Local Server;false;false]"..
"checkbox[0.25,1.6;cb_server_announce;" .. fgettext("Public") .. ";" ..
dump(core.setting_getbool("server_announce")) .. "]" ..
"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
@ -60,7 +60,7 @@ local function get_formspec(tabview, name, tabdata)
menu_render_worldlist() ..
";" .. index .. "]"
return 'size[12,5.2]'..retval
return 'size[12,5.4;false]'..retval
end
--------------------------------------------------------------------------------

View File

@ -75,9 +75,9 @@ local function dlg_confirm_reset_formspec(data)
local retval =
"size[8,3]" ..
"label[1,1;".. fgettext("Are you sure to reset your singleplayer world?") .. "]"..
"image_button[1,2;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_reset_singleplayer_confirm;"..
"image_button[1,2;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_reset_singleplayer_confirm;"..
fgettext("Yes") .. "]" ..
"image_button[4,2;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_reset_singleplayer_cancel;"..
"image_button[4,2;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_reset_singleplayer_cancel;"..
fgettext("No!!!") .. "]"
return retval
end
@ -209,10 +209,10 @@ local function formspec(tabview, name, tabdata)
if PLATFORM ~= "Android" then
tab_string = tab_string ..
"image_button[8,4.75;3.75,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_change_keys;".. fgettext("Change keys") .. "]"
"image_button[8,4.75;3.75,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_change_keys;".. fgettext("Change keys") .. "]"
else
tab_string = tab_string ..
"image_button[8,4.75;3.75,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_reset_singleplayer;".. fgettext("Reset singleplayer world") .. "]"
"image_button[8,4.75;3.75,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_reset_singleplayer;".. fgettext("Reset singleplayer world") .. "]"
end
tab_string = tab_string ..
"box[0,4.25;3.5,1.1;#999999]" ..
@ -260,7 +260,7 @@ local function formspec(tabview, name, tabdata)
"textlist[8.33,2.7;4,1;;#888888" .. fgettext("Waving Leaves") .. ";0;true]" ..
"textlist[8.33,3.2;4,1;;#888888" .. fgettext("Waving Plants") .. ";0;true]"
end
return 'size[12,5.2]'..tab_string
return 'size[12,5.2,false]'..tab_string
end
--------------------------------------------------------------------------------

View File

@ -22,7 +22,7 @@ local function get_formspec(tabview, name, tabdata)
local render_details = dump(core.setting_getbool("public_serverlist"))
retval = retval ..
"label[8,0.5;".. fgettext("Name/Password") .. "]" ..
"label[8,0.8;".. fgettext("Name/Password") .. "]" ..
"field[0.25,3.25;5.5,0.5;te_address;;" ..
core.formspec_escape(core.setting_get("address")) .."]" ..
"field[5.75,3.25;2.25,0.5;te_port;;" ..

View File

@ -82,21 +82,21 @@ local function get_formspec(tabview, name, tabdata)
)
retval = retval ..
"image_button[4,4.15;2.6,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete;".. fgettext("Delete") .. "]" ..
"image_button[6.5,4.15;2.8,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;".. fgettext("New") .. "]" ..
"image_button[9.2,4.15;2.55,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;".. fgettext("Configure") .. "]" ..
"image_button[8.5,4.95;3.25,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;play;".. fgettext("Play") .. "]" ..
"image_button[4,4.15;2.6,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete;".. fgettext("Delete") .. "]" ..
"image_button[6.5,4.15;2.8,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;".. fgettext("New") .. "]" ..
"image_button[9.2,4.15;2.55,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;".. fgettext("Configure") .. "]" ..
"image_button[8.5,4.95;3.25,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;play;".. fgettext("Play") .. "]" ..
"label[4,-0.25;".. fgettext("Select World:") .. "]"..
"checkbox[0.25,0.15;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
dump(core.setting_getbool("creative_mode")) .. "]"..
"checkbox[0.25,0.6;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
dump(core.setting_getbool("enable_damage")) .. "]"..
"image_button[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png;b_single;;false;false]"..
"image_button[0.3,1.3;3,0.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_trans.png;btn_server;Local Server;false;false]"..
"image[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png]"..
"image_button[0.8,1.3;3,0.8;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_trans.png;btn_server;Local Server;false;false]"..
"textlist[4,0.25;7.5,3.7;sp_worlds;" ..
menu_render_worldlist() ..
";" .. index .. "]"
return 'size[12,5.2]'..retval
return 'size[12,5.4;false]'..retval
end
local function main_button_handler(this, fields, name, tabdata)