diff --git a/Mappy/Data/SystemConfig.cs b/Mappy/Data/SystemConfig.cs
index bff44ab..ef37a0e 100644
--- a/Mappy/Data/SystemConfig.cs
+++ b/Mappy/Data/SystemConfig.cs
@@ -112,6 +112,8 @@ public class SystemConfig : CharacterConfiguration
public bool MinimapShowQuestDirectionArrow = true;
/// Show direction arrows for nearby FATEs on the minimap (purple, matching FATE marker).
public bool MinimapShowFateDirectionArrows = true;
+ /// Show a red direction arrow pointing toward the player flag when it's off the minimap.
+ public bool MinimapShowFlagDirectionArrow = true;
/// Show quest objective area radius circles on the minimap (same as Area Map).
public bool MinimapShowQuestAreaRadius = true;
/// When true, minimap hides with the game GUI (dialogue, interaction, nameplates off). When false, minimap stays visible during dialogue and object interaction.
diff --git a/Mappy/MapRenderer/MapRenderer.Core.cs b/Mappy/MapRenderer/MapRenderer.Core.cs
index 79b4020..940804b 100644
--- a/Mappy/MapRenderer/MapRenderer.Core.cs
+++ b/Mappy/MapRenderer/MapRenderer.Core.cs
@@ -282,6 +282,8 @@ public unsafe partial class MapRenderer : IDisposable
DrawMinimapQuestDirectionArrow(contentTopLeft, drawPosition, scale, size, centerOffset, cached.OffsetX, cached.OffsetY, cached.ScaleFactor, currentMapId);
if (System.SystemConfig.MinimapShowFateDirectionArrows)
DrawMinimapFateDirectionArrows(contentTopLeft, drawPosition, scale, size, centerOffset, cached.OffsetX, cached.OffsetY, cached.ScaleFactor);
+ if (System.SystemConfig.MinimapShowFlagDirectionArrow)
+ DrawMinimapFlagDirectionArrow(contentTopLeft, drawPosition, scale, size, centerOffset, cached.OffsetX, cached.OffsetY, cached.ScaleFactor);
}
private void TrimMinimapCacheToLimit()
diff --git a/Mappy/MapRenderer/MapRenderer.MinimapMarkers.cs b/Mappy/MapRenderer/MapRenderer.MinimapMarkers.cs
index da1b86c..8936410 100644
--- a/Mappy/MapRenderer/MapRenderer.MinimapMarkers.cs
+++ b/Mappy/MapRenderer/MapRenderer.MinimapMarkers.cs
@@ -150,14 +150,7 @@ public partial class MapRenderer
list.Add((tx, ty, tooltip, iconId));
}
- if (agent->FlagMarkerCount > 0) {
- ref var flag = ref agent->FlagMapMarkers[0];
- if (flag.TerritoryId == agent->CurrentMapId || flag.TerritoryId == agent->CurrentTerritoryId) {
- var tooltip = System.TooltipCache.GetValue(flag.MapMarker.IconId);
- if (string.IsNullOrEmpty(tooltip)) tooltip = "Flag";
- AddIfNew(1024.0f + (flag.XFloat - offsetX) * scaleFactor, 1024.0f + (flag.YFloat - offsetY) * scaleFactor, tooltip, flag.MapMarker.IconId);
- }
- }
+ // Flag excluded: drawn separately with red arrow via DrawMinimapFlagDirectionArrow
if (agent->TempMapMarkerCount > 0) {
var span = new Span(Unsafe.AsPointer(ref agent->TempMapMarkers[0]), agent->TempMapMarkerCount);
@@ -290,6 +283,65 @@ public partial class MapRenderer
}
}
+ /// Draws a red direction arrow at the edge of the minimap pointing toward the player flag. Only shown when the flag is off the minimap.
+ private unsafe void DrawMinimapFlagDirectionArrow(
+ Vector2 contentTopLeft,
+ Vector2 drawPosition,
+ float scale,
+ Vector2 size,
+ Vector2 centerOffset,
+ float offsetX,
+ float offsetY,
+ float scaleFactor)
+ {
+ var agent = AgentMap.Instance();
+ if (agent->FlagMarkerCount is 0) return;
+ ref var flag = ref agent->FlagMapMarkers[0];
+ if (flag.TerritoryId != agent->CurrentTerritoryId || flag.MapId != agent->CurrentMapId) return;
+
+ var radius = Math.Min(size.X, size.Y) * 0.5f;
+ var arrowDist = radius - 4f;
+ var centerScreen = contentTopLeft + centerOffset;
+ var drawList = ImGui.GetWindowDrawList();
+
+ var tx = 1024.0f + (flag.XFloat - offsetX) * scaleFactor;
+ var ty = 1024.0f + (flag.YFloat - offsetY) * scaleFactor;
+ var targetInContent = drawPosition + new Vector2(tx, ty) * scale;
+ var toTarget = targetInContent - centerOffset;
+ var distToTarget = toTarget.Length();
+ if (distToTarget < 0.01f) return;
+ if (distToTarget <= radius) return; // Flag visible on minimap, no arrow
+
+ const float arrowSize = 20f;
+ const float baseHalf = 8f;
+ const float headDepth = 5f;
+ var colorHead = ImGui.GetColorU32(new Vector4(0.92f, 0.2f, 0.2f, 0.95f));
+ var colorOutline = ImGui.GetColorU32(new Vector4(0.45f, 0.08f, 0.08f, 1f));
+
+ var direction = toTarget / distToTarget;
+ var arrowPos = centerScreen + direction * arrowDist;
+ var cos = MathF.Cos(MathF.Atan2(direction.Y, direction.X));
+ var sin = MathF.Sin(MathF.Atan2(direction.Y, direction.X));
+ var perpX = -sin;
+ var perpY = cos;
+ var tipScreen = arrowPos + new Vector2(cos * arrowSize, sin * arrowSize);
+ var baseBack = arrowPos - new Vector2(cos * headDepth, sin * headDepth);
+ var base1Screen = baseBack + new Vector2(perpX * baseHalf, perpY * baseHalf);
+ var base2Screen = baseBack - new Vector2(perpX * baseHalf, perpY * baseHalf);
+
+ drawList.AddTriangleFilled(tipScreen, base1Screen, base2Screen, colorHead);
+ drawList.AddTriangle(tipScreen, base1Screen, base2Screen, colorOutline, 2f);
+
+ var tooltip = System.TooltipCache.GetValue(flag.MapMarker.IconId);
+ if (string.IsNullOrEmpty(tooltip)) tooltip = "Flag";
+ var minX = Math.Min(tipScreen.X, Math.Min(base1Screen.X, base2Screen.X)) - 4f;
+ var minY = Math.Min(tipScreen.Y, Math.Min(base1Screen.Y, base2Screen.Y)) - 4f;
+ var maxX = Math.Max(tipScreen.X, Math.Max(base1Screen.X, base2Screen.X)) + 4f;
+ var maxY = Math.Max(tipScreen.Y, Math.Max(base1Screen.Y, base2Screen.Y)) + 4f;
+ if (ImGui.IsMouseHoveringRect(new Vector2(minX, minY), new Vector2(maxX, maxY)))
+ ImGui.SetTooltip(tooltip);
+ }
+
private static bool IsInMinimapBounds(Vector2 contentPos, Vector2 size, float margin)
{
// Use a large margin so we don't cull markers that are panned slightly off (zoomed in).
diff --git a/Mappy/Mappy.csproj b/Mappy/Mappy.csproj
index bd80f85..42f5ba3 100644
--- a/Mappy/Mappy.csproj
+++ b/Mappy/Mappy.csproj
@@ -4,7 +4,7 @@
HSMappy
HSMappy
Knack117
- 1.0.0.1
+ 1.0.0.2
A more versatile in-game map.
Replaces the in-game map with an ImGui implementation with several additional features. Fork with minimap improvements, quest radius on minimap, and more.
http://brassnet.ddns.net:33983/KnackAtNite/HSMappy
diff --git a/Mappy/Windows/ConfigurationWindow.cs b/Mappy/Windows/ConfigurationWindow.cs
index 2223ae3..6d597f3 100644
--- a/Mappy/Windows/ConfigurationWindow.cs
+++ b/Mappy/Windows/ConfigurationWindow.cs
@@ -280,6 +280,9 @@ public class MinimapOptionsTab : ITabItem
configChanged |= ImGui.Checkbox("Show FATE Direction Arrows", ref System.SystemConfig.MinimapShowFateDirectionArrows);
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
ImGui.SetTooltip("Show purple arrows at the edge of the minimap pointing toward nearby FATEs.");
+ configChanged |= ImGui.Checkbox("Show Flag Direction Arrow", ref System.SystemConfig.MinimapShowFlagDirectionArrow);
+ if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
+ ImGui.SetTooltip("Show a red arrow at the edge of the minimap pointing toward your placed flag.");
configChanged |= ImGui.Checkbox("Show Quest Area Radius", ref System.SystemConfig.MinimapShowQuestAreaRadius);
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
ImGui.SetTooltip("Show quest objective area circles on the minimap (same as on the Area Map).");
diff --git a/Mappy/pluginmaster.json b/Mappy/pluginmaster.json
index f0db4b5..0babe6b 100644
--- a/Mappy/pluginmaster.json
+++ b/Mappy/pluginmaster.json
@@ -1 +1 @@
-[{"Author":"Knack117","Name":"HSMappy","Punchline":"A more versatile in-game map.","Description":"Replaces the in-game map with an ImGui implementation with several additional features. Fork with minimap improvements, quest radius on minimap, white gradient player cone, and more.","Changelog":"1.0.0.1: Duty List quest click keeps Area Map open; player flags show on minimap. 1.0.0.0: Initial HSMappy release. Minimap: quest radius circle (orange, transparent), tooltip; cone drawn under markers; white gradient cone; /hsmappy commands.","InternalName":"HSMappy","AssemblyVersion":"1.0.0.1","RepoUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy","ApplicableVersion":"any","Tags":["map","mapping","overlay","utility"],"CategoryTags":["jobs"],"DalamudApiLevel":14,"DownloadLinkInstall":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.1/latest.zip","IsHide":false,"IsTestingExclusive":false,"DownloadLinkTesting":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.1/latest.zip","DownloadLinkUpdate":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.1/latest.zip","LastUpdate":"1772140521"}]
+[{"Author":"Knack117","Name":"HSMappy","Punchline":"A more versatile in-game map.","Description":"Replaces the in-game map with an ImGui implementation with several additional features. Fork with minimap improvements, quest radius on minimap, white gradient player cone, and more.","Changelog":"1.0.0.2: Red direction arrow on minimap pointing to player flag. 1.0.0.1: Duty List quest click keeps Area Map open; player flags show on minimap. 1.0.0.0: Initial HSMappy release. Minimap: quest radius circle (orange, transparent), tooltip; cone drawn under markers; white gradient cone; /hsmappy commands.","InternalName":"HSMappy","AssemblyVersion":"1.0.0.2","RepoUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy","ApplicableVersion":"any","Tags":["map","mapping","overlay","utility"],"CategoryTags":["jobs"],"DalamudApiLevel":14,"DownloadLinkInstall":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.2/latest.zip","IsHide":false,"IsTestingExclusive":false,"DownloadLinkTesting":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.2/latest.zip","DownloadLinkUpdate":"http://brassnet.ddns.net:33983/KnackAtNite/HSMappy/releases/download/v1.0.0.2/latest.zip","LastUpdate":"1772140942"}]