From 80fff5c10e6351bd742cc08500f46754f3d43244 Mon Sep 17 00:00:00 2001 From: PurpleHato <47987542+PurpleHato@users.noreply.github.com> Date: Sun, 15 Oct 2023 18:06:58 +0200 Subject: [PATCH] FIX: MVSC declaration order --- src/port/ui/ImguiUI.cpp | 10 +++++----- src/port/ui/UIWidgets.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index d524814e..5f68e65f 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -81,24 +81,24 @@ void DrawSettingsMenu(){ if(UIWidgets::BeginMenu("Settings")){ if (UIWidgets::BeginMenu("Audio")) { UIWidgets::CVarSliderFloat("Master Volume", "gGameMasterVolume", 0.0f, 1.0f, 1.0f, { - .isPercentage = true, .format = "%.0f%%", + .isPercentage = true, }); if (UIWidgets::CVarSliderFloat("Main Music Volume", "gMainMusicVolume", 0.0f, 1.0f, 1.0f, { - .isPercentage = true, .format = "%.0f%%", + .isPercentage = true, })) { audio_set_player_volume(SEQ_PLAYER_LEVEL, CVarGetFloat("gMainMusicVolume", 1.0f)); } if (UIWidgets::CVarSliderFloat("Sound Effects Volume", "gSFXMusicVolume", 0.0f, 1.0f, 1.0f, { - .isPercentage = true, .format = "%.0f%%", + .isPercentage = true, })) { audio_set_player_volume(SEQ_PLAYER_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f)); } if (UIWidgets::CVarSliderFloat("Environment Volume", "gEnvironmentVolume", 0.0f, 1.0f, 1.0f, { - .isPercentage = true, .format = "%.0f%%", + .isPercentage = true, })) { audio_set_player_volume(SEQ_PLAYER_ENV, CVarGetFloat("gEnvironmentVolume", 1.0f)); } @@ -148,8 +148,8 @@ void DrawSettingsMenu(){ }); if (CVarGetInteger("gInputEnabled", 0)) { UIWidgets::CVarSliderFloat("Input Scale", "gInputScale", 1.0f, 3.0f, 1.0f, { + .tooltip = "Sets the on screen size of the displayed inputs from the Show Inputs setting", .format = "%.1fx", - .tooltip = "Sets the on screen size of the displayed inputs from the Show Inputs setting" }); } diff --git a/src/port/ui/UIWidgets.cpp b/src/port/ui/UIWidgets.cpp index 7ddc6dad..cef68266 100644 --- a/src/port/ui/UIWidgets.cpp +++ b/src/port/ui/UIWidgets.cpp @@ -909,7 +909,7 @@ namespace UIWidgets { } } if (options.showButtons) { - if (Button("-", { .size = Sizes::Inline, .color = options.color }) && *value > min) { + if (Button("-", { .color = options.color, .size = Sizes::Inline }) && *value > min) { *value -= options.step; if (*value < min) *value = min; LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); @@ -927,7 +927,7 @@ namespace UIWidgets { if (options.showButtons) { ImGui::SameLine(0, 3.0f); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (Button("+", { .size = Sizes::Inline, .color = options.color }) && *value < max) { + if (Button("+", { .color = options.color, .size = Sizes::Inline }) && *value < max) { *value += options.step; if (*value > max) *value = max; LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); @@ -980,7 +980,7 @@ namespace UIWidgets { } } if (options.showButtons) { - if (Button("-", { .size = Sizes::Inline, .color = options.color }) && *value > min) { + if (Button("-", { .color = options.color, .size = Sizes::Inline }) && *value > min) { *value -= options.step; if (*value < min) *value = min; LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); @@ -999,7 +999,7 @@ namespace UIWidgets { if (options.showButtons) { ImGui::SameLine(0, 3.0f); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (Button("+", { .size = Sizes::Inline, .color = options.color }) && *value < max) { + if (Button("+", { .color = options.color, .size = Sizes::Inline }) && *value < max) { *value += options.step; if (*value > max) *value = max; LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();