Skip to content

Commit

Permalink
Fix log sliders
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 23, 2022
1 parent e70067c commit 445d041
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/Common/IldaeilUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,8 @@ class IldaeilUI : public UI,
if (param.readonly)
{
ImGui::BeginDisabled();
ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.printformat, ImGuiSliderFlags_NoInput);
ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.printformat,
ImGuiSliderFlags_NoInput | (param.log ? ImGuiSliderFlags_Logarithmic : 0x0));
ImGui::EndDisabled();
continue;
}
Expand All @@ -1044,7 +1045,7 @@ class IldaeilUI : public UI,
else
{
const bool ret = param.log
? ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.printformat, 2.0f)
? ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.printformat, ImGuiSliderFlags_Logarithmic)
: ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.printformat);
if (ret)
{
Expand Down

0 comments on commit 445d041

Please sign in to comment.