mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 15:12:23 +01:00
Fix FSAA dropdown option reset after changing another dropdown option
This commit is contained in:
parent
fa1096ec49
commit
ffd0ef16c4
@ -68,9 +68,9 @@ local dd_antialiasing_labels = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local antialiasing = {
|
local antialiasing = {
|
||||||
{dd_antialiasing_labels[1]..","..dd_antialiasing_labels[2]..","..
|
{dd_antialiasing_labels[1]..","..dd_antialiasing_labels[2]..","..
|
||||||
dd_antialiasing_labels[3]..","..dd_antialiasing_labels[4]},
|
dd_antialiasing_labels[3]..","..dd_antialiasing_labels[4]},
|
||||||
{"0", "2", "4", "8"}
|
{"0", "2", "4", "8"}
|
||||||
}
|
}
|
||||||
|
|
||||||
local function getFilterSettingIndex()
|
local function getFilterSettingIndex()
|
||||||
@ -95,7 +95,7 @@ end
|
|||||||
|
|
||||||
local function getAntialiasingSettingIndex()
|
local function getAntialiasingSettingIndex()
|
||||||
local antialiasing_setting = core.setting_get("fsaa")
|
local antialiasing_setting = core.setting_get("fsaa")
|
||||||
for i=1, #(antialiasing[2]) do
|
for i = 1, #(antialiasing[2]) do
|
||||||
if antialiasing_setting == antialiasing[2][i] then
|
if antialiasing_setting == antialiasing[2][i] then
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
@ -104,13 +104,12 @@ local function getAntialiasingSettingIndex()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function antialiasing_fname_to_name(fname)
|
local function antialiasing_fname_to_name(fname)
|
||||||
for i=1, #(dd_antialiasing_labels) do
|
for i = 1, #(dd_antialiasing_labels) do
|
||||||
if fname == dd_antialiasing_labels[i] then
|
if fname == dd_antialiasing_labels[i] then
|
||||||
return antialiasing[2][i]
|
return antialiasing[2][i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return 0
|
||||||
return "0"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function dlg_confirm_reset_formspec(data)
|
local function dlg_confirm_reset_formspec(data)
|
||||||
@ -418,8 +417,11 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
|
|||||||
core.setting_set("anisotropic_filter", "true")
|
core.setting_set("anisotropic_filter", "true")
|
||||||
ddhandled = true
|
ddhandled = true
|
||||||
end
|
end
|
||||||
core.setting_set("fsaa",
|
if fields["dd_antialiasing"] then
|
||||||
antialiasing_fname_to_name(fields["dd_antialiasing"]))
|
core.setting_set("fsaa",
|
||||||
|
antialiasing_fname_to_name(fields["dd_antialiasing"]))
|
||||||
|
ddhandled = true
|
||||||
|
end
|
||||||
|
|
||||||
return ddhandled
|
return ddhandled
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user