add 'audio.acoustic-effects' setting

This commit is contained in:
MihailRis 2026-02-12 21:48:09 +03:00
parent cd537cc1cb
commit d6bd5bd8fa
7 changed files with 42 additions and 8 deletions

View file

@ -24,6 +24,14 @@ function update_setting(x, id, name, postfix)
)
end
function create_checkbox(id, name, tooltip)
tooltip = tooltip or ''
document.root:add(string.format(
"<checkbox consumer='function(x) app.set_setting(\"%s\", x) end' checked='%s' tooltip='%s'>%s</checkbox>",
id, app.str_setting(id), gui.str(tooltip, "settings"), gui.str(name, "settings")
))
end
local initialized = false
function on_open()
@ -71,4 +79,6 @@ function on_open()
if info then
selectbox.value = info.device_specifier
end
create_checkbox("audio.acoustic-effects", "Acoustic effects", "audio.acoustic-effects.tooltip")
end

View file

@ -39,7 +39,7 @@ function on_open()
create_setting("chunks.load-distance", "Load Distance", 1)
create_setting("chunks.load-speed", "Load Speed", 1)
create_setting("graphics.fog-curve", "Fog Curve", 0.1)
create_checkbox("graphics.backlight", "Backlight", "graphics.backlight.tooltip")
create_checkbox("graphics.soft-lighting", "Soft lighting", "graphics.soft-lighting.tooltip")
create_checkbox("graphics.dense-render", "Dense blocks render", "graphics.dense-render.tooltip")