[UX] Add fine tune in contrast (#5413)

This commit is contained in:
Robert
2019-09-24 00:24:45 +02:00
committed by poire-z
parent f96cfe940b
commit 02218cb9e2
5 changed files with 99 additions and 19 deletions

View File

@@ -42,16 +42,41 @@ function optionsutil.showValues(configurable, option, prefix)
current = arg_table[current]
end
if option.labels and option.values then
for i=1,#option.labels do
if default == option.values[i] then
default = option.labels[i]
break
if option.more_options_param and option.more_options_param.value_table then
if option.more_options_param.args_table then
for k,v in pairs(option.more_options_param.args_table) do
if v == current then
current = k
break
end
end
end
end
for i=1,#option.labels do
if current == option.values[i] then
current = option.labels[i]
break
current = option.more_options_param.value_table[current]
if default ~= _("not set") then
if option.more_options_param.args_table then
for k,v in pairs(option.more_options_param.args_table) do
if v == default then
default = k
break
end
end
end
default = option.more_options_param.value_table[default]
end
else
if default ~= _("not set") then
for i=1,#option.labels do
if default == option.values[i] then
default = option.labels[i]
break
end
end
end
for i=1,#option.labels do
if current == option.values[i] then
current = option.labels[i]
break
end
end
end
end