mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
GUI scale (#737): - add display.gui-scale setting (0 - auto, 1..4 - fixed integer scale) - auto mode picks the largest scale keeping at least 640x480 UI units - apply scale in GUI (root size, camera, cursor, tooltips, scissors) - HUD layout and ModelViewer use scaled coordinates - add GUI Scale trackbar to display settings Volume contrast (#399): - add audio.volume-contrast setting (100% - unchanged sounds, 0% - loud sounds are lowered to the level of quiet ones) - loudness (RMS) of a sound is calculated once and cached - add trackbar to audio settings and reset page
45 lines
1.1 KiB
Lua
45 lines
1.1 KiB
Lua
function reset(category)
|
|
if category == "aud" then
|
|
reset_audio()
|
|
elseif category == "dsp" then
|
|
reset_display()
|
|
elseif category == "gfx" then
|
|
reset_graphics()
|
|
elseif category == "ctl" then
|
|
reset_control()
|
|
end
|
|
end
|
|
|
|
function reset_setting(name)
|
|
app.set_setting(name, app.get_setting_info(name).def)
|
|
end
|
|
|
|
function reset_audio()
|
|
reset_setting("audio.volume-master")
|
|
reset_setting("audio.volume-regular")
|
|
reset_setting("audio.volume-ui")
|
|
reset_setting("audio.volume-ambient")
|
|
reset_setting("audio.volume-music")
|
|
reset_setting("audio.volume-contrast")
|
|
end
|
|
|
|
function reset_display()
|
|
reset_setting("camera.fov")
|
|
reset_setting("display.framerate")
|
|
reset_setting("display.fullscreen")
|
|
reset_setting("camera.shaking")
|
|
reset_setting("camera.inertia")
|
|
reset_setting("camera.fov-effects")
|
|
end
|
|
|
|
function reset_graphics()
|
|
reset_setting("chunks.load-distance")
|
|
reset_setting("chunks.load-speed")
|
|
reset_setting("graphics.fog-curve")
|
|
reset_setting("graphics.gamma")
|
|
reset_setting("graphics.backlight")
|
|
end
|
|
|
|
function reset_control()
|
|
input.reset_bindings()
|
|
end
|