diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-12-03 17:21:40 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-12-03 18:55:25 +0100 |
commit | 2330267d2207208799ad347ea0d129c0b4551d61 (patch) | |
tree | a4418b0c9fe42ee7944f0531c76f353069735615 /builtin | |
parent | 60113bde74784f4a0125ffa005e9404fbd5cb5b1 (diff) | |
download | minetest-2330267d2207208799ad347ea0d129c0b4551d61.tar.gz minetest-2330267d2207208799ad347ea0d129c0b4551d61.tar.bz2 minetest-2330267d2207208799ad347ea0d129c0b4551d61.zip |
Shaders rework.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu.lua | 74 |
1 files changed, 55 insertions, 19 deletions
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua index 6c0aaf252..9555146d4 100644 --- a/builtin/mainmenu.lua +++ b/builtin/mainmenu.lua @@ -687,7 +687,21 @@ function tabbuilder.handle_settings_buttons(fields) if fields["cb_finite_liquid"] then engine.setting_set("liquid_finite", fields["cb_finite_liquid"]) end - + if fields["cb_bumpmapping"] then + engine.setting_set("enable_bumpmapping", fields["cb_bumpmapping"]) + end + if fields["cb_parallax"] then + engine.setting_set("enable_parallax_occlusion", fields["cb_parallax"]) + end + if fields["cb_waving_water"] then + engine.setting_set("enable_waving_water", fields["cb_waving_water"]) + end + if fields["cb_waving_leaves"] then + engine.setting_set("enable_waving_leaves", fields["cb_waving_leaves"]) + end + if fields["cb_waving_plants"] then + engine.setting_set("enable_waving_plants", fields["cb_waving_plants"]) + end if fields["btn_change_keys"] ~= nil then engine.show_keys_menu() end @@ -923,35 +937,57 @@ end -------------------------------------------------------------------------------- function tabbuilder.tab_settings() - return "vertlabel[0,0;" .. fgettext("SETTINGS") .. "]" .. - "checkbox[1,0.75;cb_fancy_trees;".. fgettext("Fancy trees") .. ";" + tab_string = + "vertlabel[0,0;" .. fgettext("SETTINGS") .. "]" .. + "checkbox[1,0;cb_fancy_trees;".. fgettext("Fancy Trees") .. ";" .. dump(engine.setting_getbool("new_style_leaves")) .. "]".. - "checkbox[1,1.25;cb_smooth_lighting;".. fgettext("Smooth Lighting") + "checkbox[1,0.5;cb_smooth_lighting;".. fgettext("Smooth Lighting") .. ";".. dump(engine.setting_getbool("smooth_lighting")) .. "]".. - "checkbox[1,1.75;cb_3d_clouds;".. fgettext("3D Clouds") .. ";" + "checkbox[1,1;cb_3d_clouds;".. fgettext("3D Clouds") .. ";" .. dump(engine.setting_getbool("enable_3d_clouds")) .. "]".. - "checkbox[1,2.25;cb_opaque_water;".. fgettext("Opaque Water") .. ";" + "checkbox[1,1.5;cb_opaque_water;".. fgettext("Opaque Water") .. ";" .. dump(engine.setting_getbool("opaque_water")) .. "]".. + "checkbox[1,2.0;cb_pre_ivis;".. fgettext("Preload item visuals") .. ";" + .. dump(engine.setting_getbool("preload_item_visuals")) .. "]".. + "checkbox[1,2.5;cb_particles;".. fgettext("Enable Particles") .. ";" + .. dump(engine.setting_getbool("enable_particles")) .. "]".. + "checkbox[1,3.0;cb_finite_liquid;".. fgettext("Finite Liquid") .. ";" + .. dump(engine.setting_getbool("liquid_finite")) .. "]".. - "checkbox[4,0.75;cb_mipmapping;".. fgettext("Mip-Mapping") .. ";" + "checkbox[4.5,0;cb_mipmapping;".. fgettext("Mip-Mapping") .. ";" .. dump(engine.setting_getbool("mip_map")) .. "]".. - "checkbox[4,1.25;cb_anisotrophic;".. fgettext("Anisotropic Filtering") .. ";" + "checkbox[4.5,0.5;cb_anisotrophic;".. fgettext("Anisotropic Filtering") .. ";" .. dump(engine.setting_getbool("anisotropic_filter")) .. "]".. - "checkbox[4,1.75;cb_bilinear;".. fgettext("Bi-Linear Filtering") .. ";" + "checkbox[4.5,1.0;cb_bilinear;".. fgettext("Bi-Linear Filtering") .. ";" .. dump(engine.setting_getbool("bilinear_filter")) .. "]".. - "checkbox[4,2.25;cb_trilinear;".. fgettext("Tri-Linear Filtering") .. ";" + "checkbox[4.5,1.5;cb_trilinear;".. fgettext("Tri-Linear Filtering") .. ";" .. dump(engine.setting_getbool("trilinear_filter")) .. "]".. - "checkbox[7.5,0.75;cb_shaders;".. fgettext("Shaders") .. ";" + "checkbox[8,0;cb_shaders;".. fgettext("Shaders") .. ";" .. dump(engine.setting_getbool("enable_shaders")) .. "]".. - "checkbox[7.5,1.25;cb_pre_ivis;".. fgettext("Preload item visuals") .. ";" - .. dump(engine.setting_getbool("preload_item_visuals")) .. "]".. - "checkbox[7.5,1.75;cb_particles;".. fgettext("Enable Particles") .. ";" - .. dump(engine.setting_getbool("enable_particles")) .. "]".. - "checkbox[7.5,2.25;cb_finite_liquid;".. fgettext("Finite Liquid") .. ";" - .. dump(engine.setting_getbool("liquid_finite")) .. "]".. - - "button[1,4.25;2.25,0.5;btn_change_keys;".. fgettext("Change keys") .. "]" + "button[1,4.5;2.25,0.5;btn_change_keys;".. fgettext("Change keys") .. "]" + +if engine.setting_getbool("enable_shaders") then + tab_string = tab_string .. + "checkbox[8,0.5;cb_bumpmapping;".. fgettext("Bumpmapping") .. ";" + .. dump(engine.setting_getbool("enable_bumpmapping")) .. "]".. + "checkbox[8,1.0;cb_parallax;".. fgettext("Parallax Occlusion") .. ";" + .. dump(engine.setting_getbool("enable_parallax_occlusion")) .. "]".. + "checkbox[8,1.5;cb_waving_water;".. fgettext("Waving Water") .. ";" + .. dump(engine.setting_getbool("enable_waving_water")) .. "]".. + "checkbox[8,2.0;cb_waving_leaves;".. fgettext("Waving Leaves") .. ";" + .. dump(engine.setting_getbool("enable_waving_leaves")) .. "]".. + "checkbox[8,2.5;cb_waving_plants;".. fgettext("Waving Plants") .. ";" + .. dump(engine.setting_getbool("enable_waving_plants")) .. "]" +else + tab_string = tab_string .. + "textlist[8.33,0.7;4,1;;#888888" .. fgettext("Bumpmapping") .. ";0;true]" .. + "textlist[8.33,1.2;4,1;;#888888" .. fgettext("Parallax Occlusion") .. ";0;true]" .. + "textlist[8.33,1.7;4,1;;#888888" .. fgettext("Waving Water") .. ";0;true]" .. + "textlist[8.33,2.2;4,1;;#888888" .. fgettext("Waving Leaves") .. ";0;true]" .. + "textlist[8.33,2.7;4,1;;#888888" .. fgettext("Waving Plants") .. ";0;true]" + end +return tab_string end -------------------------------------------------------------------------------- |