diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-08-03 11:16:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-03 11:16:25 -0400 |
| commit | 27c3822d05e85bff19c0988a533d0ff81f88376e (patch) | |
| tree | 0ae4d9bc2dcfef6a0801f1cfb35a2c20859905ba | |
| parent | 76b34bfbefdc9244d5dfd38f88860a5e93bee62d (diff) | |
Fix slider labels where position is None (#1227)
| -rw-r--r-- | mm/2s2h/BenGui/UIWidgets.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/2s2h/BenGui/UIWidgets.cpp b/mm/2s2h/BenGui/UIWidgets.cpp index 0defcb09b..d9792e852 100644 --- a/mm/2s2h/BenGui/UIWidgets.cpp +++ b/mm/2s2h/BenGui/UIWidgets.cpp @@ -562,7 +562,7 @@ bool SliderInt(const char* label, int32_t* value, const IntSliderOptions& option if (options.labelPosition == LabelPosition::Near) { ImGui::SameLine(); ImGui::Text(label, *value); - } else if (options.labelPosition == LabelPosition::Far || options.labelPosition == LabelPosition::None) { + } else if (options.labelPosition == LabelPosition::Far) { ImGui::SameLine(ImGui::GetContentRegionAvail().x - ImGui::CalcTextSize(label).x + ImGui::GetStyle().ItemSpacing.x); ImGui::Text(label, *value); @@ -694,7 +694,7 @@ bool SliderFloat(const char* label, float* value, const FloatSliderOptions& opti if (options.labelPosition == LabelPosition::Near) { ImGui::SameLine(); ImGui::Text(label, *value); - } else if (options.labelPosition == LabelPosition::Far || options.labelPosition == LabelPosition::None) { + } else if (options.labelPosition == LabelPosition::Far) { ImGui::SameLine(ImGui::GetContentRegionAvail().x - labelSpacing); ImGui::Text(label, *value); } |
