From 6799bdbb0381dc4f473576ab9dec1a49f1c3cfe4 Mon Sep 17 00:00:00 2001 From: Exter-N Date: Wed, 27 Sep 2023 03:15:18 +0200 Subject: [PATCH] Material Editor: Allow intentional 0 gloss --- .../UI/AdvancedWindow/ModEditWindow.Materials.ColorTable.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Penumbra/UI/AdvancedWindow/ModEditWindow.Materials.ColorTable.cs b/Penumbra/UI/AdvancedWindow/ModEditWindow.Materials.ColorTable.cs index cccc43ee..f1e48200 100644 --- a/Penumbra/UI/AdvancedWindow/ModEditWindow.Materials.ColorTable.cs +++ b/Penumbra/UI/AdvancedWindow/ModEditWindow.Materials.ColorTable.cs @@ -347,10 +347,11 @@ public partial class ModEditWindow ImGui.TableNextColumn(); tmpFloat = row.GlossStrength; ImGui.SetNextItemWidth(floatSize); - if (ImGui.DragFloat("##GlossStrength", ref tmpFloat, Math.Max(0.1f, tmpFloat * 0.025f), HalfEpsilon, HalfMaxValue, "%.1f") + float glossStrengthMin = ImGui.GetIO().KeyCtrl ? 0.0f : HalfEpsilon; + if (ImGui.DragFloat("##GlossStrength", ref tmpFloat, Math.Max(0.1f, tmpFloat * 0.025f), glossStrengthMin, HalfMaxValue, "%.1f") && FixFloat(ref tmpFloat, row.GlossStrength)) { - row.GlossStrength = Math.Max(tmpFloat, HalfEpsilon); + row.GlossStrength = Math.Max(tmpFloat, glossStrengthMin); ret = true; tab.UpdateColorTableRowPreview(rowIdx); }