diff --git a/Ninja Price/Main/Render.cs b/Ninja Price/Main/Render.cs index 198508d..d0f830d 100644 --- a/Ninja Price/Main/Render.cs +++ b/Ninja Price/Main/Render.cs @@ -615,7 +615,15 @@ private void PriceBoxOverItem(CustomItem item, RectangleF? containerBox, Color t { Graphics.DrawBox(drawBox, Settings.VisualPriceSettings.BackgroundColor); var textPosition = new Vector2(drawBox.Center.X, drawBox.Center.Y - ImGui.GetTextLineHeight() / 2); - Graphics.DrawText(item.PriceData.MinChaosValue.FormatNumber(Settings.VisualPriceSettings.SignificantDigits.Value), textPosition, + + var itemValue = item.PriceData.MinChaosValue; + if (Settings.PriceOverlaySettings.ShowUnitValue) + { + itemValue /= item.CurrencyInfo.StackSize; + if (itemValue < Settings.PriceOverlaySettings.UnitValueHintThreshold) textColor = Color.Red; + } + + Graphics.DrawText(itemValue.FormatNumber(Settings.VisualPriceSettings.SignificantDigits.Value), textPosition, textColor, FontAlign.Center); } } diff --git a/Ninja Price/Settings/Settings.cs b/Ninja Price/Settings/Settings.cs index 389c79f..76a09e3 100644 --- a/Ninja Price/Settings/Settings.cs +++ b/Ninja Price/Settings/Settings.cs @@ -162,6 +162,10 @@ public class PriceOverlaySettings public ToggleNode DoNotDrawWhileAnItemIsHovered { get; set; } = new(false); public RangeNode BoxHeight { get; set; } = new(15, 0, 100); + + public ToggleNode ShowUnitValue { get; set; } = new(false); + + public RangeNode UnitValueHintThreshold { get; set; } = new(0.9f, 0, 100); } [Submenu(CollapsedByDefault = true)]