main menu tweaks
This commit is contained in:
parent
abca1d9c91
commit
d88f63f62e
|
@ -25,7 +25,7 @@ local function get_formspec(data)
|
||||||
local mod = data.list:get_list()[data.selected_mod]
|
local mod = data.list:get_list()[data.selected_mod]
|
||||||
|
|
||||||
local retval =
|
local retval =
|
||||||
"size[11,6.5,true]" ..
|
"size[11,6.5,false]" ..
|
||||||
"label[0.5,-0.25;" .. fgettext("World:") .. "]" ..
|
"label[0.5,-0.25;" .. fgettext("World:") .. "]" ..
|
||||||
"label[1.75,-0.25;" .. data.worldspec.name .. "]"
|
"label[1.75,-0.25;" .. data.worldspec.name .. "]"
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ local function get_formspec(data)
|
||||||
"label[0,1;" .. fgettext("Depends:") .. "]" ..
|
"label[0,1;" .. fgettext("Depends:") .. "]" ..
|
||||||
"textlist[0,1.5;5,4.25;world_config_depends;" ..
|
"textlist[0,1.5;5,4.25;world_config_depends;" ..
|
||||||
modmgr.get_dependencies(mod.path) .. ";0]" ..
|
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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_config_world_cancel;" .. fgettext("Cancel") .. "]"
|
"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 ~= nil and mod.name ~= "" and mod.typ ~= "game_mod" then
|
||||||
if mod.is_modpack then
|
if mod.is_modpack then
|
||||||
|
@ -68,9 +68,9 @@ local function get_formspec(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
if all_enabled == false then
|
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
|
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
|
end
|
||||||
else
|
else
|
||||||
if mod.enabled then
|
if mod.enabled then
|
||||||
|
@ -82,7 +82,7 @@ local function get_formspec(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
retval = retval ..
|
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;"
|
"textlist[5.5,0.5;5.5,5.75;world_config_modlist;"
|
||||||
|
|
||||||
retval = retval .. modmgr.render_modlist(data.list)
|
retval = retval .. modmgr.render_modlist(data.list)
|
||||||
|
|
|
@ -46,7 +46,7 @@ local function create_world_formspec(dialogdata)
|
||||||
|
|
||||||
current_seed = core.formspec_escape(current_seed)
|
current_seed = core.formspec_escape(current_seed)
|
||||||
local retval =
|
local retval =
|
||||||
"size[12,6,true]" ..
|
"size[12,6,false]" ..
|
||||||
"label[2,0;" .. fgettext("World name") .. "]"..
|
"label[2,0;" .. fgettext("World name") .. "]"..
|
||||||
"field[4.5,0.4;6,0.5;te_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() ..
|
"textlist[4.2,3;5.8,2.3;games;" .. gamemgr.gamelist() ..
|
||||||
";" .. gameidx .. ";true]" ..
|
";" .. 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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create_cancel;" .. fgettext("Cancel") .. "]"
|
"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
|
if #gamemgr.games == 0 then
|
||||||
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..
|
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..
|
||||||
|
|
|
@ -22,10 +22,10 @@ local function delete_mod_formspec(dialogdata)
|
||||||
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
|
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
|
||||||
|
|
||||||
local retval =
|
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) .. ";]"..
|
"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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;dlg_delete_mod_cancel;" .. fgettext("No of course not!") .. "]"
|
"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
|
return retval
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
local function delete_world_formspec(dialogdata)
|
local function delete_world_formspec(dialogdata)
|
||||||
|
|
||||||
local retval =
|
local retval =
|
||||||
"size[12,6,true]" ..
|
"size[12,6,false]" ..
|
||||||
"label[2,2;" ..
|
"label[2,2;" ..
|
||||||
fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]"..
|
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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_delete_cancel;" .. fgettext("No") .. "]"
|
"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
|
return retval
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,14 @@ local function rename_modpack_formspec(dialogdata)
|
||||||
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
|
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
|
||||||
|
|
||||||
local retval =
|
local retval =
|
||||||
"size[12.4,5,true]" ..
|
"size[12.4,5,false]" ..
|
||||||
"label[1.75,1;".. fgettext("Rename Modpack:") .. "]"..
|
"label[1.75,1;".. fgettext("Rename Modpack:") .. "]"..
|
||||||
"field[4.5,1.4;6,0.5;te_modpack_name;;" ..
|
"field[4.5,1.4;6,0.5;te_modpack_name;;" ..
|
||||||
dialogdata.mod.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") .. "]" ..
|
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") .. "]"
|
fgettext("Cancel") .. "]"
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
|
|
@ -61,8 +61,8 @@ end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function get_formspec2(tabview, name, tabdata)
|
local function get_formspec2(tabview, name, tabdata)
|
||||||
local retval = ""
|
local retval = 'size[12,5.2,false]'
|
||||||
retval = retval .. "bgcolor[#00000000;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,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[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]"
|
--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
|
local ratio = xdiv/ydiv
|
||||||
--print(xdiv..' x '..ydiv..' = '..ratio)
|
--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]'
|
--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
|
return retval --.. rnd
|
||||||
|
@ -170,7 +172,7 @@ local function init_globals()
|
||||||
|
|
||||||
|
|
||||||
-- Create main tabview
|
-- 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:set_autosave_tab(false)
|
||||||
tv_main:add(tab_main)
|
tv_main:add(tab_main)
|
||||||
tv_main:add(tab_singleplayer)
|
tv_main:add(tab_singleplayer)
|
||||||
|
|
|
@ -162,7 +162,7 @@ function modstore.successfulldialog(downloading_dlg)
|
||||||
retval = retval .. "label[0,0.75;" .. fgettext("Shortname:") .. "]"
|
retval = retval .. "label[0,0.75;" .. fgettext("Shortname:") .. "]"
|
||||||
retval = retval .. "label[3,0.75;" .. core.formspec_escape(modstore.lastmodentry.moddetails.basename) .. "]"
|
retval = retval .. "label[3,0.75;" .. core.formspec_escape(modstore.lastmodentry.moddetails.basename) .. "]"
|
||||||
end
|
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
|
return retval
|
||||||
end,
|
end,
|
||||||
function(this,fields)
|
function(this,fields)
|
||||||
|
@ -491,7 +491,7 @@ function modstore.getshortmodinfo(ypos,listentry,details)
|
||||||
if details.basename then
|
if details.basename then
|
||||||
--install button
|
--install button
|
||||||
local buttony = ypos + 1.2
|
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
|
if modmgr.mod_exists(details.basename) then
|
||||||
retval = retval .. fgettext("re-Install") .."]"
|
retval = retval .. fgettext("re-Install") .."]"
|
||||||
|
@ -515,7 +515,7 @@ function modstore.getmodlist(list,yoffset)
|
||||||
local sb_y_start = 0.2 + yoffset
|
local sb_y_start = 0.2 + yoffset
|
||||||
local sb_y_end = (modstore.modsperpage * 1.75) + ((modstore.modsperpage-1) * 0.15)
|
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) ..
|
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
|
if #list.data == 0 then
|
||||||
return close_button
|
return close_button
|
||||||
|
@ -529,9 +529,9 @@ function modstore.getmodlist(list,yoffset)
|
||||||
((sb_y_end -1.6)/(list.pagecount-1)) * list.page
|
((sb_y_end -1.6)/(list.pagecount-1)) * list.page
|
||||||
scrollbar = scrollbar .. "box[11.6," ..scrollbarpos .. ";0.28,0.5;#32CD32]"
|
scrollbar = scrollbar .. "box[11.6," ..scrollbarpos .. ";0.28,0.5;#32CD32]"
|
||||||
scrollbar = scrollbar .. "image_button[11.6," .. (sb_y_start)
|
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)
|
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 = ""
|
local retval = ""
|
||||||
|
|
||||||
|
@ -577,7 +577,7 @@ function modstore.getsearchpage(tabview, name, tabdata)
|
||||||
end
|
end
|
||||||
|
|
||||||
retval = retval ..
|
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 .. "]"
|
"field[0.5,0.5;9,0.5;te_modstore_search;;" .. search .. "]"
|
||||||
|
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
|
|
|
@ -36,7 +36,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
-- "label[0.8,4.2;" .. fgettext("Add mod:") .. "]" ..
|
-- "label[0.8,4.2;" .. fgettext("Add mod:") .. "]" ..
|
||||||
-- TODO Disabled due to upcoming release 0.4.8 and irrlicht messing up localization
|
-- 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.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
|
local selected_mod = nil
|
||||||
|
|
||||||
|
@ -89,9 +89,9 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
|
|
||||||
if selected_mod.is_modpack then
|
if selected_mod.is_modpack then
|
||||||
retval = retval .. ";0]" ..
|
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") .. "]"
|
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") .. "]"
|
.. fgettext("Uninstall selected modpack") .. "]"
|
||||||
else
|
else
|
||||||
--show dependencies
|
--show dependencies
|
||||||
|
@ -102,7 +102,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
|
|
||||||
retval = retval .. toadd .. ";0]"
|
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") .. "]"
|
.. fgettext("Uninstall selected mod") .. "]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,11 +32,11 @@ if not tabdata then tabdata = {} end
|
||||||
|
|
||||||
if not core.setting_getbool("public_serverlist") then
|
if not core.setting_getbool("public_serverlist") then
|
||||||
retval = retval ..
|
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
|
end
|
||||||
|
|
||||||
retval = retval ..
|
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;;" ..
|
"field[8,1.95;2.95,0.5;te_name;;" ..
|
||||||
core.formspec_escape(core.setting_get("name")) .. "]" ..
|
core.formspec_escape(core.setting_get("name")) .. "]" ..
|
||||||
"pwdfield[10.78,1.95;1.77,0.5;te_pwd;]" ..
|
"pwdfield[10.78,1.95;1.77,0.5;te_pwd;]" ..
|
||||||
|
@ -85,7 +85,7 @@ if not tabdata then tabdata = {} end
|
||||||
retval = retval .. ";0]"
|
retval = retval .. ";0]"
|
||||||
end
|
end
|
||||||
|
|
||||||
return 'size[12,5.2]'..retval
|
return 'size[12,5.4;false]'..retval
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -23,18 +23,18 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
)
|
)
|
||||||
|
|
||||||
local retval =
|
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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;" .. fgettext("New") .. "]" ..
|
"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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;" .. fgettext("Configure") .. "]" ..
|
"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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;start_server;" .. fgettext("Start Game") .. "]" ..
|
"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:") .. "]" ..
|
"label[4,-0.25;" .. fgettext("Select World:") .. "]" ..
|
||||||
"checkbox[0.25,0.15;cb_creative_mode;" .. fgettext("Creative Mode") .. ";" ..
|
"checkbox[0.25,0.15;cb_creative_mode;" .. fgettext("Creative Mode") .. ";" ..
|
||||||
dump(core.setting_getbool("creative_mode")) .. "]" ..
|
dump(core.setting_getbool("creative_mode")) .. "]" ..
|
||||||
"checkbox[0.25,0.6;cb_enable_damage;" .. fgettext("Enable Damage") .. ";" ..
|
"checkbox[0.25,0.6;cb_enable_damage;" .. fgettext("Enable Damage") .. ";" ..
|
||||||
dump(core.setting_getbool("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[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png]"..
|
||||||
"image_button[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_check.png;b_single;;false;false]"..
|
"image[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_check.png]"..
|
||||||
"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_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") .. ";" ..
|
"checkbox[0.25,1.6;cb_server_announce;" .. fgettext("Public") .. ";" ..
|
||||||
dump(core.setting_getbool("server_announce")) .. "]" ..
|
dump(core.setting_getbool("server_announce")) .. "]" ..
|
||||||
"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
|
"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
|
||||||
|
@ -60,7 +60,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
menu_render_worldlist() ..
|
menu_render_worldlist() ..
|
||||||
";" .. index .. "]"
|
";" .. index .. "]"
|
||||||
|
|
||||||
return 'size[12,5.2]'..retval
|
return 'size[12,5.4;false]'..retval
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -75,9 +75,9 @@ local function dlg_confirm_reset_formspec(data)
|
||||||
local retval =
|
local retval =
|
||||||
"size[8,3]" ..
|
"size[8,3]" ..
|
||||||
"label[1,1;".. fgettext("Are you sure to reset your singleplayer world?") .. "]"..
|
"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") .. "]" ..
|
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!!!") .. "]"
|
fgettext("No!!!") .. "]"
|
||||||
return retval
|
return retval
|
||||||
end
|
end
|
||||||
|
@ -209,10 +209,10 @@ local function formspec(tabview, name, tabdata)
|
||||||
|
|
||||||
if PLATFORM ~= "Android" then
|
if PLATFORM ~= "Android" then
|
||||||
tab_string = tab_string ..
|
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
|
else
|
||||||
tab_string = tab_string ..
|
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
|
end
|
||||||
tab_string = tab_string ..
|
tab_string = tab_string ..
|
||||||
"box[0,4.25;3.5,1.1;#999999]" ..
|
"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,2.7;4,1;;#888888" .. fgettext("Waving Leaves") .. ";0;true]" ..
|
||||||
"textlist[8.33,3.2;4,1;;#888888" .. fgettext("Waving Plants") .. ";0;true]"
|
"textlist[8.33,3.2;4,1;;#888888" .. fgettext("Waving Plants") .. ";0;true]"
|
||||||
end
|
end
|
||||||
return 'size[12,5.2]'..tab_string
|
return 'size[12,5.2,false]'..tab_string
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -22,7 +22,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
local render_details = dump(core.setting_getbool("public_serverlist"))
|
local render_details = dump(core.setting_getbool("public_serverlist"))
|
||||||
|
|
||||||
retval = retval ..
|
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;;" ..
|
"field[0.25,3.25;5.5,0.5;te_address;;" ..
|
||||||
core.formspec_escape(core.setting_get("address")) .."]" ..
|
core.formspec_escape(core.setting_get("address")) .."]" ..
|
||||||
"field[5.75,3.25;2.25,0.5;te_port;;" ..
|
"field[5.75,3.25;2.25,0.5;te_port;;" ..
|
||||||
|
|
|
@ -82,21 +82,21 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
)
|
)
|
||||||
|
|
||||||
retval = retval ..
|
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[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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_create;".. fgettext("New") .. "]" ..
|
"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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;world_configure;".. fgettext("Configure") .. "]" ..
|
"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.5;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_button.png;play;".. fgettext("Play") .. "]" ..
|
"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:") .. "]"..
|
"label[4,-0.25;".. fgettext("Select World:") .. "]"..
|
||||||
"checkbox[0.25,0.15;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
"checkbox[0.25,0.15;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
||||||
dump(core.setting_getbool("creative_mode")) .. "]"..
|
dump(core.setting_getbool("creative_mode")) .. "]"..
|
||||||
"checkbox[0.25,0.6;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
|
"checkbox[0.25,0.6;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
|
||||||
dump(core.setting_getbool("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[0.25,1.3;0.58,0.55;"..minetest.formspec_escape(mm_texture.basetexturedir).."menu_checkf.png]"..
|
||||||
"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_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;" ..
|
"textlist[4,0.25;7.5,3.7;sp_worlds;" ..
|
||||||
menu_render_worldlist() ..
|
menu_render_worldlist() ..
|
||||||
";" .. index .. "]"
|
";" .. index .. "]"
|
||||||
return 'size[12,5.2]'..retval
|
return 'size[12,5.4;false]'..retval
|
||||||
end
|
end
|
||||||
|
|
||||||
local function main_button_handler(this, fields, name, tabdata)
|
local function main_button_handler(this, fields, name, tabdata)
|
||||||
|
|
Loading…
Reference in New Issue