Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Ninja Price/Main/Render.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
4 changes: 4 additions & 0 deletions Ninja Price/Settings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ public class PriceOverlaySettings
public ToggleNode DoNotDrawWhileAnItemIsHovered { get; set; } = new(false);

public RangeNode<int> BoxHeight { get; set; } = new(15, 0, 100);

public ToggleNode ShowUnitValue { get; set; } = new(false);

public RangeNode<float> UnitValueHintThreshold { get; set; } = new(0.9f, 0, 100);
}

[Submenu(CollapsedByDefault = true)]
Expand Down