mirror of https://github.com/minetest/minetest.git
Fix style on settings tab
This commit is contained in:
parent
148fffb0f2
commit
adde4084b8
|
@ -128,35 +128,35 @@ local function formspec(tabview, name, tabdata)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local filters = {
|
local filters = {
|
||||||
{"No Filter,Bilinear Filter,Trilinear Filter"},
|
{"No Filter,Bilinear Filter,Trilinear Filter"},
|
||||||
{"", "bilinear_filter", "trilinear_filter"},
|
{"", "bilinear_filter", "trilinear_filter"},
|
||||||
}
|
}
|
||||||
|
|
||||||
local mipmap = {
|
local mipmap = {
|
||||||
{"No Mipmap,Mipmap,Mipmap + Aniso. Filter"},
|
{"No Mipmap,Mipmap,Mipmap + Aniso. Filter"},
|
||||||
{"", "mip_map", "anisotropic_filter"},
|
{"", "mip_map", "anisotropic_filter"},
|
||||||
}
|
}
|
||||||
|
|
||||||
local function getFilterSettingIndex()
|
local function getFilterSettingIndex()
|
||||||
if (core.setting_get(filters[2][3]) == "true") then
|
if (core.setting_get(filters[2][3]) == "true") then
|
||||||
return 3
|
return 3
|
||||||
end
|
end
|
||||||
if (core.setting_get(filters[2][3]) == "false" and core.setting_get(filters[2][2]) == "true") then
|
if (core.setting_get(filters[2][3]) == "false" and core.setting_get(filters[2][2]) == "true") then
|
||||||
return 2
|
return 2
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local function getMipmapSettingIndex()
|
local function getMipmapSettingIndex()
|
||||||
if (core.setting_get(mipmap[2][3]) == "true") then
|
if (core.setting_get(mipmap[2][3]) == "true") then
|
||||||
return 3
|
return 3
|
||||||
end
|
end
|
||||||
if (core.setting_get(mipmap[2][3]) == "false" and core.setting_get(mipmap[2][2]) == "true") then
|
if (core.setting_get(mipmap[2][3]) == "false" and core.setting_get(mipmap[2][2]) == "true") then
|
||||||
return 2
|
return 2
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local tab_string =
|
local tab_string =
|
||||||
"box[0,0;3.5,3.9;#999999]" ..
|
"box[0,0;3.5,3.9;#999999]" ..
|
||||||
|
@ -241,7 +241,8 @@ end
|
||||||
"textlist[8.33,2.2;4,1;;#888888" .. fgettext("Waving Water") .. ";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,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 tab_string
|
return tab_string
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -343,26 +344,32 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
|
||||||
if fields["dd_filters"] == "No Filter" then
|
if fields["dd_filters"] == "No Filter" then
|
||||||
core.setting_set("bilinear_filter", "false")
|
core.setting_set("bilinear_filter", "false")
|
||||||
core.setting_set("trilinear_filter", "false")
|
core.setting_set("trilinear_filter", "false")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
if fields["dd_filters"] == "Bilinear Filter" then
|
if fields["dd_filters"] == "Bilinear Filter" then
|
||||||
core.setting_set("bilinear_filter", "true")
|
core.setting_set("bilinear_filter", "true")
|
||||||
core.setting_set("trilinear_filter", "false")
|
core.setting_set("trilinear_filter", "false")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
if fields["dd_filters"] == "Trilinear Filter" then
|
if fields["dd_filters"] == "Trilinear Filter" then
|
||||||
core.setting_set("bilinear_filter", "false")
|
core.setting_set("bilinear_filter", "false")
|
||||||
core.setting_set("trilinear_filter", "true")
|
core.setting_set("trilinear_filter", "true")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
if fields["dd_mipmap"] == "No Mipmap" then
|
if fields["dd_mipmap"] == "No Mipmap" then
|
||||||
core.setting_set("mip_map", "false")
|
core.setting_set("mip_map", "false")
|
||||||
core.setting_set("anisotropic_filter", "false")
|
core.setting_set("anisotropic_filter", "false")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
if fields["dd_mipmap"] == "Mipmap" then
|
if fields["dd_mipmap"] == "Mipmap" then
|
||||||
core.setting_set("mip_map", "true")
|
core.setting_set("mip_map", "true")
|
||||||
core.setting_set("anisotropic_filter", "false")
|
core.setting_set("anisotropic_filter", "false")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
if fields["dd_mipmap"] == "Mipmap + Aniso. Filter" then
|
if fields["dd_mipmap"] == "Mipmap + Aniso. Filter" then
|
||||||
core.setting_set("mip_map", "true")
|
core.setting_set("mip_map", "true")
|
||||||
core.setting_set("anisotropic_filter", "true")
|
core.setting_set("anisotropic_filter", "true")
|
||||||
|
ddhandled = true
|
||||||
end
|
end
|
||||||
|
|
||||||
return ddhandled
|
return ddhandled
|
||||||
|
|
Loading…
Reference in New Issue