diff --git a/builtin/mainmenu/dlg_config_world.lua b/builtin/mainmenu/dlg_config_world.lua index 4a4b78b3c..475132c85 100644 --- a/builtin/mainmenu/dlg_config_world.lua +++ b/builtin/mainmenu/dlg_config_world.lua @@ -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) @@ -126,7 +126,7 @@ local function handle_buttons(this, fields) if event.type == "DCL" then enable_mod(this) end - + return true end @@ -155,7 +155,7 @@ local function handle_buttons(this, fields) if current == nil then current = {} end - + if fields["cb_hide_gamemods"] ~= nil then if core.is_yes(fields["cb_hide_gamemods"]) then current.hide_game = true @@ -219,7 +219,7 @@ local function handle_buttons(this, fields) if not worldfile:write() then core.log("error", "Failed to write world config file") end - + this:delete() return true end @@ -262,14 +262,14 @@ function create_configure_world_dlg(worldidx) if dlg.data.worldspec == nil then dlg:delete() return nil end dlg.data.worldconfig = modmgr.get_worldconfig(dlg.data.worldspec.path) - + if dlg.data.worldconfig == nil or dlg.data.worldconfig.id == nil or dlg.data.worldconfig.id == "" then dlg:delete() return nil end - + dlg.data.list = filterlist.create( modmgr.preparemodlist, --refresh modmgr.comparemod, --compare diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index d727b1a22..156c1f843 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -32,13 +32,13 @@ local function create_world_formspec(dialogdata) mglist = mglist .. v .. "," end mglist = mglist:sub(1, -2) - + local gameid = core.setting_get("menu_last_game") - + local game, gameidx = nil , 0 if gameid ~= nil then game, gameidx = gamemgr.find_by_gameid(gameid) - + if gameidx == nil then gameidx = 0 end @@ -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,9 +60,9 @@ 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;" .. fgettext("You have no subgames installed.") .. "]label[2.25,4.4;" .. @@ -122,7 +122,7 @@ local function create_world_buttonhandler(this, fields) if fields["games"] then return true end - + if fields["world_create_cancel"] then this:delete() return true @@ -138,6 +138,6 @@ function create_create_world_dlg(update_worldlistfilter) create_world_buttonhandler, nil) retval.update_worldlist_filter = update_worldlistfilter - + return retval end diff --git a/builtin/mainmenu/dlg_delete_mod.lua b/builtin/mainmenu/dlg_delete_mod.lua index 72639665c..c6280598e 100644 --- a/builtin/mainmenu/dlg_delete_mod.lua +++ b/builtin/mainmenu/dlg_delete_mod.lua @@ -18,15 +18,15 @@ -------------------------------------------------------------------------------- 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 @@ -47,7 +47,7 @@ local function delete_mod_buttonhandler(this, fields) this:delete() return true end - + if fields["dlg_delete_mod_cancel"] then this:delete() return true diff --git a/builtin/mainmenu/dlg_delete_world.lua b/builtin/mainmenu/dlg_delete_world.lua index a935e3eb6..0ebb22db7 100644 --- a/builtin/mainmenu/dlg_delete_world.lua +++ b/builtin/mainmenu/dlg_delete_world.lua @@ -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 @@ -38,12 +38,12 @@ local function delete_world_buttonhandler(this, fields) this:delete() return true end - + if fields["world_delete_cancel"] then this:delete() return true end - + return false end @@ -59,6 +59,6 @@ function create_delete_world_dlg(name_to_del,index_to_del) nil) retval.data.delete_name = name_to_del retval.data.delete_index = index_to_del - + return retval end diff --git a/builtin/mainmenu/dlg_rename_modpack.lua b/builtin/mainmenu/dlg_rename_modpack.lua index a3ddf63eb..67a9c377d 100644 --- a/builtin/mainmenu/dlg_rename_modpack.lua +++ b/builtin/mainmenu/dlg_rename_modpack.lua @@ -18,20 +18,20 @@ -------------------------------------------------------------------------------- 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 end @@ -44,11 +44,11 @@ local function rename_modpack_buttonhandler(this, fields) modmgr.refresh_globals() modmgr.selected_mod = modmgr.global_mods:get_current_index( modmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"])) - + this:delete() return true end - + if fields["dlg_rename_modpack_cancel"] then this:delete() return true diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index eca6a2c2e..ebc33ff3f 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -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) diff --git a/builtin/mainmenu/store.lua b/builtin/mainmenu/store.lua index c8bf5b5f4..f0d5c8fa7 100644 --- a/builtin/mainmenu/store.lua +++ b/builtin/mainmenu/store.lua @@ -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 .. diff --git a/builtin/mainmenu/tab_mods.lua b/builtin/mainmenu/tab_mods.lua index 6aa7f25b5..c63a3e03d 100644 --- a/builtin/mainmenu/tab_mods.lua +++ b/builtin/mainmenu/tab_mods.lua @@ -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 diff --git a/builtin/mainmenu/tab_multiplayer.lua b/builtin/mainmenu/tab_multiplayer.lua index 5c955dbee..ae91d226e 100644 --- a/builtin/mainmenu/tab_multiplayer.lua +++ b/builtin/mainmenu/tab_multiplayer.lua @@ -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 -------------------------------------------------------------------------------- diff --git a/builtin/mainmenu/tab_server.lua b/builtin/mainmenu/tab_server.lua index a40d8cdf4..77c251119 100644 --- a/builtin/mainmenu/tab_server.lua +++ b/builtin/mainmenu/tab_server.lua @@ -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 -------------------------------------------------------------------------------- diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index afadfb26f..370bd22d5 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -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 -------------------------------------------------------------------------------- diff --git a/builtin/mainmenu/tab_simple_main.lua b/builtin/mainmenu/tab_simple_main.lua index 90e375771..9cd3eba16 100644 --- a/builtin/mainmenu/tab_simple_main.lua +++ b/builtin/mainmenu/tab_simple_main.lua @@ -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;;" .. @@ -35,7 +35,7 @@ local function get_formspec(tabview, name, tabdata) "field[8.75,1.5;3.5,0.5;te_name;;" .. core.formspec_escape(core.setting_get("name")) .."]" .. "pwdfield[8.75,2.3;3.5,0.5;te_pwd;]" - + if render_details then retval = retval .. "tablecolumns[" .. "color,span=3;" .. diff --git a/builtin/mainmenu/tab_singleplayer.lua b/builtin/mainmenu/tab_singleplayer.lua index 4ccb514bf..1de6a57a7 100644 --- a/builtin/mainmenu/tab_singleplayer.lua +++ b/builtin/mainmenu/tab_singleplayer.lua @@ -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)