mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Material Editor: Allow intentional 0 gloss
This commit is contained in:
parent
6ca8ad2385
commit
6799bdbb03
1 changed files with 3 additions and 2 deletions
|
|
@ -347,10 +347,11 @@ public partial class ModEditWindow
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
tmpFloat = row.GlossStrength;
|
tmpFloat = row.GlossStrength;
|
||||||
ImGui.SetNextItemWidth(floatSize);
|
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))
|
&& FixFloat(ref tmpFloat, row.GlossStrength))
|
||||||
{
|
{
|
||||||
row.GlossStrength = Math.Max(tmpFloat, HalfEpsilon);
|
row.GlossStrength = Math.Max(tmpFloat, glossStrengthMin);
|
||||||
ret = true;
|
ret = true;
|
||||||
tab.UpdateColorTableRowPreview(rowIdx);
|
tab.UpdateColorTableRowPreview(rowIdx);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue