mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Merge remote-tracking branch 'Exter-N/allow-intentional-zero-gloss' into API9
This commit is contained in:
commit
4e40ed3be4
1 changed files with 3 additions and 2 deletions
|
|
@ -348,10 +348,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