Merge pull request #19 from PurpleHato/MVSCBuild

FIX: MVSC declaration order
This commit is contained in:
Lywx
2023-10-15 22:59:15 -06:00
committed by GitHub
2 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -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"
});
}
+4 -4
View File
@@ -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();