diff --git a/Ninja Price/Main/Render.cs b/Ninja Price/Main/Render.cs index 9810615..60fa98d 100644 --- a/Ninja Price/Main/Render.cs +++ b/Ninja Price/Main/Render.cs @@ -1123,6 +1123,7 @@ private void ProcessAncestorFightRewards() private void ProcessItemsOnGround() { if (!Settings.GroundItemSettings.PriceItemsOnGround && !Settings.UniqueIdentificationSettings.ShowRealUniqueNameOnGround && !Settings.GroundItemSettings.PriceHeistRewards) return; + if (GameController.IngameState.IngameUi.FullscreenPanels.Any(x => x.IsVisible)) return; //this window allows us to change the size of the text we draw to the background list //yeah, it's weird ImGui.Begin("lmao", @@ -1216,8 +1217,10 @@ void DrawOnItemLabel(float scale, string text, Color backgroundColor, Color text ImGui.SetWindowFontScale(scale); var newTextSize = ImGui.CalcTextSize(text); var textPosition = box.Center.ToVector2Num() - newTextSize / 2; - var rectPosition = new Vector2(textPosition.X, box.Top + 1); - drawList.AddRectFilled(rectPosition, rectPosition + new Vector2(newTextSize.X, box.Height - 2), backgroundColor.ToImgui()); + var (backgroundLeft, backgroundRight) = Settings.UniqueIdentificationSettings.BackgroundCoversWholeLabel + ? (box.Left + 1, box.Right - 1) + : (textPosition.X, textPosition.X + newTextSize.X); + drawList.AddRectFilled(new Vector2(backgroundLeft, box.Top + 1), new Vector2(backgroundRight, box.Bottom - 1), backgroundColor.ToImgui()); drawList.AddText(textPosition, textColor.ToImgui(), text); ImGui.SetWindowFontScale(1); } diff --git a/Ninja Price/Settings/Settings.cs b/Ninja Price/Settings/Settings.cs index a4a8d2e..05e9fcd 100644 --- a/Ninja Price/Settings/Settings.cs +++ b/Ninja Price/Settings/Settings.cs @@ -161,6 +161,9 @@ public class UniqueIdentificationSettings public ToggleNode OnlyShowRealUniqueNameForValuableUniques { get; set; } = new(false); public ToggleNode ShowWarningTextForUnknownUniques { get; set; } = new(true); public RangeNode UniqueLabelSize { get; set; } = new(0.8f, 0.1f, 1); + + [Menu(null, "Draw the name background over the whole item label instead of only behind the text")] + public ToggleNode BackgroundCoversWholeLabel { get; set; } = new(false); public ColorNode UniqueItemNameTextColor { get; set; } = new(Color.Black); public ColorNode UniqueItemNameBackgroundColor { get; set; } = new(new Color(175, 96, 37)); public ColorNode ValuableUniqueItemNameTextColor { get; set; } = new(new Color(175, 96, 37));