-local function formspec(tabview, name, tabdata)
- local tab_string =
- "vertlabel[0,-0.25;" .. fgettext("SETTINGS") .. "]" ..
- "box[0.75,0;3.25,4;#999999]" ..
- "checkbox[1,0;cb_fancy_trees;".. fgettext("Fancy Trees") .. ";"
- .. dump(core.setting_getbool("new_style_leaves")) .. "]"..
- "checkbox[1,0.5;cb_smooth_lighting;".. fgettext("Smooth Lighting")
- .. ";".. dump(core.setting_getbool("smooth_lighting")) .. "]"..
- "checkbox[1,1;cb_3d_clouds;".. fgettext("3D Clouds") .. ";"
- .. dump(core.setting_getbool("enable_3d_clouds")) .. "]"..
- "checkbox[1,1.5;cb_opaque_water;".. fgettext("Opaque Water") .. ";"
- .. dump(core.setting_getbool("opaque_water")) .. "]"..
- "checkbox[1,2.0;cb_pre_ivis;".. fgettext("Preload item visuals") .. ";"
- .. dump(core.setting_getbool("preload_item_visuals")) .. "]"..
- "checkbox[1,2.5;cb_particles;".. fgettext("Enable Particles") .. ";"
- .. dump(core.setting_getbool("enable_particles")) .. "]"..
- "box[4.25,0;3.25,2.5;#999999]" ..
- "checkbox[4.5,0;cb_mipmapping;".. fgettext("Mip-Mapping") .. ";"
- .. dump(core.setting_getbool("mip_map")) .. "]"..
- "checkbox[4.5,0.5;cb_anisotrophic;".. fgettext("Anisotropic Filtering") .. ";"
- .. dump(core.setting_getbool("anisotropic_filter")) .. "]"..
- "checkbox[4.5,1.0;cb_bilinear;".. fgettext("Bi-Linear Filtering") .. ";"
- .. dump(core.setting_getbool("bilinear_filter")) .. "]"..
- "checkbox[4.5,1.5;cb_trilinear;".. fgettext("Tri-Linear Filtering") .. ";"
- .. dump(core.setting_getbool("trilinear_filter")) .. "]"..
- "box[7.75,0;4,4;#999999]" ..
- "checkbox[8,0;cb_shaders;".. fgettext("Shaders") .. ";"
- .. dump(core.setting_getbool("enable_shaders")) .. "]"
- if not ANDROID then
- tab_string = tab_string ..
- "button[8,4.75;3.75,0.5;btn_change_keys;".. fgettext("Change keys") .. "]"
- else
- tab_string = tab_string ..
- "button[8,4.75;3.75,0.5;btn_reset_singleplayer;".. fgettext("Reset singleplayer world") .. "]"
- end
- tab_string = tab_string ..
- "box[0.75,4.25;3.25,1.25;#999999]" ..
- "label[1,4.25;" .. fgettext("GUI scale factor") .. "]" ..
- "dropdown[1,4.75;3.0;dd_gui_scaling;0.5,0.625,0.75,0.875,1.0,1.25,1.5,2.0;"
- .. gui_scale_index() .. "]"
-
- if ANDROID then
- tab_string = tab_string ..
- "box[4.25,2.75;3.25,2.15;#999999]" ..
- "checkbox[4.5,2.75;cb_touchscreen_target;".. fgettext("Touch free target") .. ";"
- .. dump(core.setting_getbool("touchtarget")) .. "]"
- end
-
- if core.setting_get("touchscreen_threshold") ~= nil then
- tab_string = tab_string ..
- "label[4.5,3.5;" .. fgettext("Touchthreshold (px)") .. "]" ..
- "dropdown[4.5,4;3;dd_touchthreshold;0,10,20,30,40,50;" ..
- ((tonumber(core.setting_get("touchscreen_threshold"))/10)+1) .. "]"
- end
-
- if core.setting_getbool("enable_shaders") then
- tab_string = tab_string ..
- "checkbox[8,0.5;cb_bumpmapping;".. fgettext("Bumpmapping") .. ";"
- .. dump(core.setting_getbool("enable_bumpmapping")) .. "]"..
- "checkbox[8,1.0;cb_generate_normalmaps;".. fgettext("Generate Normalmaps") .. ";"
- .. dump(core.setting_getbool("generate_normalmaps")) .. "]"..
- "checkbox[8,1.5;cb_parallax;".. fgettext("Parallax Occlusion") .. ";"
- .. dump(core.setting_getbool("enable_parallax_occlusion")) .. "]"..
- "checkbox[8,2.0;cb_waving_water;".. fgettext("Waving Water") .. ";"
- .. dump(core.setting_getbool("enable_waving_water")) .. "]"..
- "checkbox[8,2.5;cb_waving_leaves;".. fgettext("Waving Leaves") .. ";"
- .. dump(core.setting_getbool("enable_waving_leaves")) .. "]"..
- "checkbox[8,3.0;cb_waving_plants;".. fgettext("Waving Plants") .. ";"
- .. dump(core.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("Generate Normalmaps") .. ";0;true]" ..
- "textlist[8.33,1.7;4,1;;#888888" .. fgettext("Parallax Occlusion") .. ";0;true]" ..
- "textlist[8.33,2.2;4,1;;#888888" .. fgettext("Waving Water") .. ";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]"