Apply correct alpha to toggle lights for greyed out buttons

This commit is contained in:
Hyper 2025-01-29 12:52:10 +00:00
parent a19e434e9b
commit b26baea13c
2 changed files with 2 additions and 2 deletions

View file

@ -915,7 +915,7 @@ static void DrawSourceButton(ButtonColumn buttonColumn, float yRatio, const char
auto lightSize = Scale(14);
DrawButton(min, max, sourceText, true, sourceSet, buttonPressed, (max.x - min.x) - lightSize * 10);
DrawToggleLight({ min.x + lightSize, min.y + ((max.y - min.y) - lightSize) / 2 + Scale(1) }, sourceSet);
DrawToggleLight({ min.x + lightSize, min.y + ((max.y - min.y) - lightSize) / 2 + Scale(1) }, sourceSet, sourceSet ? 1.0f : 0.5f);
}
static void DrawProgressBar(float progressRatio)

View file

@ -805,7 +805,7 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef<T>* conf
SetShaderModifier(IMGUI_SHADER_MODIFIER_NONE);
if constexpr (std::is_same_v<T, bool>)
DrawToggleLight({ min.x + Scale(14), min.y + ((max.y - min.y) - Scale(14)) / 2 + Scale(1) }, config->Value);
DrawToggleLight({ min.x + Scale(14), min.y + ((max.y - min.y) - Scale(14)) / 2 + Scale(1) }, config->Value, alpha);
// Selection triangles
if (lockedOnOption)