Add ability to activate mods with doubleclick (remove old_style_mod_selection)

stable-0.4
PilzAdam 2013-08-16 00:12:10 +02:00
parent 5e312dc40d
commit d52185c43e
3 changed files with 68 additions and 84 deletions

View File

@ -654,9 +654,6 @@ function tabbuilder.handle_settings_buttons(fields)
if fields["cb_opaque_water"] then
engine.setting_setbool("opaque_water",tabbuilder.tobool(fields["cb_opaque_water"]))
end
if fields["old_style_modselection"] then
engine.setting_setbool("old_style_mod_selection",tabbuilder.tobool(fields["old_style_modselection"]))
end
if fields["cb_mipmapping"] then
engine.setting_setbool("mip_map",tabbuilder.tobool(fields["cb_mipmapping"]))
@ -964,7 +961,6 @@ function tabbuilder.tab_settings()
"checkbox[1,1.25;cb_smooth_lighting;Smooth Lighting;".. dump(engine.setting_getbool("smooth_lighting")) .. "]"..
"checkbox[1,1.75;cb_3d_clouds;3D Clouds;" .. dump(engine.setting_getbool("enable_3d_clouds")) .. "]"..
"checkbox[1,2.25;cb_opaque_water;Opaque Water;" .. dump(engine.setting_getbool("opaque_water")) .. "]"..
"checkbox[1,2.75;old_style_modselection;Old style modmgr;" .. dump(engine.setting_getbool("old_style_mod_selection")) .. "]"..
"checkbox[4,0.75;cb_mipmapping;Mip-Mapping;" .. dump(engine.setting_getbool("mip_map")) .. "]"..
"checkbox[4,1.25;cb_anisotrophic;Anisotropic Filtering;".. dump(engine.setting_getbool("anisotropic_filter")) .. "]"..

View File

@ -395,7 +395,6 @@ function modmgr.dialog_configure_world()
"button[9.25,6.35;2,0.5;btn_config_world_save;Save]" ..
"button[7.4,6.35;2,0.5;btn_config_world_cancel;Cancel]"
if engine.setting_get("old_style_mod_selection") == "true" then
if mod ~= nil and mod.name ~= "" then
if mod.is_modpack then
local rawlist = filterlist.get_raw_list(modmgr.modlist)
@ -425,15 +424,9 @@ function modmgr.dialog_configure_world()
end
retval = retval ..
"button[8.5,-0.125;2.5,0.5;btn_all_mods;Enable all]"
else
retval = retval ..
"button[5.5,-0.125;5.75,0.5;btn_all_mods;Enable all Mods]"
end
retval = retval ..
"button[8.5,-0.125;2.5,0.5;btn_all_mods;Enable all]" ..
"textlist[5.5,0.5;5.5,5.75;world_config_modlist;"
retval = retval .. modmgr.render_modlist(modmgr.modlist)
retval = retval .. ";" .. modmgr.world_config_selected_mod .."]"
@ -665,7 +658,6 @@ function modmgr.handle_configure_world_buttons(fields)
local event = explode_textlist_event(fields["world_config_modlist"])
modmgr.world_config_selected_mod = event.index
if engine.setting_get("old_style_mod_selection") ~= "true" then
if event.typ == "DCL" then
local mod = filterlist.get_list(modmgr.modlist)[event.index]
@ -691,9 +683,7 @@ function modmgr.handle_configure_world_buttons(fields)
end
end
end
end
if engine.setting_get("old_style_mod_selection") == "true" then
if fields["cb_mod_enable"] ~= nil then
local mod = filterlist.get_list(modmgr.modlist)
[engine.get_textlist_index("world_config_modlist")]
@ -721,7 +711,6 @@ function modmgr.handle_configure_world_buttons(fields)
end
end
end
end
if fields["cb_hide_gamemods"] ~= nil then
local current = filterlist.get_filtercriteria(modmgr.modlist)

View File

@ -275,7 +275,6 @@ void set_default_settings(Settings *settings)
settings->setDefault("main_menu_script","");
settings->setDefault("main_menu_mod_mgr","1");
settings->setDefault("old_style_mod_selection","true");
settings->setDefault("main_menu_game_mgr","0");
settings->setDefault("modstore_download_url", "https://forum.minetest.net/media/");
settings->setDefault("modstore_listmods_url", "https://forum.minetest.net/mmdb/mods/");