mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Fixed master volume slider
This commit is contained in:
parent
02930be9ee
commit
60cbfd67be
@ -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