mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-10-31 23:55:06 -04:00
Fixed master volume slider
This commit is contained in:
parent
02930be9ee
commit
f802f06219
@ -391,8 +391,8 @@ namespace SohImGui {
|
|||||||
if (ImGui::BeginMenu("Audio")) {
|
if (ImGui::BeginMenu("Audio")) {
|
||||||
const float volume = Game::Settings.audio.master;
|
const float volume = Game::Settings.audio.master;
|
||||||
ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume));
|
ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume));
|
||||||
if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) {
|
if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "", ImGuiSliderFlags_AlwaysClamp)) {
|
||||||
CVar_SetFloat("gGameMasterVolume", volume);
|
CVar_SetFloat("gGameMasterVolume", Game::Settings.audio.master);
|
||||||
needs_save = true;
|
needs_save = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user