Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding adjustment #5

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
9 changes: 6 additions & 3 deletions Main/MapNotify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,17 @@ public void RenderItem(NormalInventoryItem Item, Entity Entity, bool isInventory
classID.Contains("HeistBlueprint")) &&
ItemDetails.ActiveWarnings.Count == 0) return;
// Get mouse position
var boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 24, MouseLite.GetCursorPositionVector().Y);
var boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 25, MouseLite.GetCursorPositionVector().Y);

// Pad vertically as well if using ninja pricer tooltip
if (Settings.PadForNinjaPricer && ItemDetails.NeedsPadding)
boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 24, MouseLite.GetCursorPositionVector().Y + 56);
boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 25, MouseLite.GetCursorPositionVector().Y + 56);
// Pad vertically as well if using ninja pricer tooltip 2nd padding
if (Settings.PadForNinjaPricer2 && ItemDetails.NeedsPadding)
boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 25, MouseLite.GetCursorPositionVector().Y + 114);
// Personal pricer
if (Settings.PadForAltPricer && ItemDetails.NeedsPadding)
boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 24, MouseLite.GetCursorPositionVector().Y + 30);
boxOrigin = new nuVector2(MouseLite.GetCursorPositionVector().X + 25, MouseLite.GetCursorPositionVector().Y + 30);

// Parsing inventory, don't use boxOrigin
if (isInventory)
Expand Down
2 changes: 2 additions & 0 deletions Settings/DrawSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ public override void DrawSettings()
ImGui.SameLine(); HelpMarker("This will irreversibly delete all your existing warnings config files!");
Settings.PadForNinjaPricer.Value = Checkbox("Pad for Ninja Pricer", Settings.PadForNinjaPricer);
ImGui.SameLine(); HelpMarker("This will move the tooltip down vertically to allow room for the Ninja Pricer tooltip to be rendered. Only needed with that plugin active.");
Settings.PadForNinjaPricer2.Value = Checkbox("More Pad for Ninja Pricer", Settings.PadForNinjaPricer2);
ImGui.SameLine(); HelpMarker("This will move the tooltip down vertically to allow room for the Ninja Pricer tooltip to be rendered. Only needed with that plugin active.");
Settings.PadForAltPricer.Value = Checkbox("Pad for Personal Pricer", Settings.PadForAltPricer);
ImGui.SameLine(); HelpMarker("It's unlikely you'll need this.");
ImGui.Spacing();
Expand Down
1 change: 1 addition & 0 deletions Settings/MapNotifySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class MapNotifySettings : ISettings
public ToggleNode ShowCompletion { get; set; } = new(true);
public ToggleNode HorizontalLines { get; set; } = new(true);
public ToggleNode PadForNinjaPricer { get; set; } = new(false);
public ToggleNode PadForNinjaPricer2 { get; set; } = new(false);
public ToggleNode PadForAltPricer { get; set; } = new(false);
public ToggleNode AlwaysShowTooltip { get; set; } = new(true);
public ToggleNode AlwaysShowCompletionBorder { get; set; } = new(true);
Expand Down