Fortnite Funny

This commit is contained in:
XTigerHyperX 2021-12-12 23:23:10 +01:00
parent 7eb6d8090e
commit 249757454f
No known key found for this signature in database
GPG Key ID: 8A8613BA3CC915BD

View File

@ -274,6 +274,8 @@ namespace FModel.Creator.Bases.FN
c.DrawText(_value.ToString(), new SKPoint(width - 50, y + 10), _statPaint);
if (_maxValue < 1 || !float.TryParse(_value.ToString(), out var floatValue)) return;
if (floatValue < 0)
floatValue = 0;
var sliderWidth = (sliderRight - height * 2) * (floatValue / _maxValue);
c.DrawRect(new SKRect(height * 2, y, Math.Min(height * 2 + sliderWidth, sliderRight), y + 5), _statPaint);
}