v1.0.0.13: User-placed map notes with Title/Description; custom icon; notes on minimap

Made-with: Cursor
This commit is contained in:
2026-03-01 00:12:37 -05:00
parent b1c833ebcf
commit 542da3a71b
12 changed files with 383 additions and 17 deletions
+35
View File
@@ -0,0 +1,35 @@
using System.Linq;
using System.Numerics;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using Mappy.Classes;
using Mappy.Data;
namespace Mappy.MapRenderer;
public partial class MapRenderer
{
private unsafe void DrawMapNotes()
{
var agent = AgentMap.Instance();
var territoryId = agent->SelectedTerritoryId;
var mapId = agent->SelectedMapId;
foreach (var note in System.MapNoteConfig.Notes.Where(n => n.Territory == territoryId && n.Map == mapId).ToList()) {
var pos = new Vector2(note.X, note.Y) * Scale * DrawHelpers.GetMapScaleFactor() + DrawHelpers.GetCombinedOffsetVector() * Scale;
DrawHelpers.DrawMapMarker(new MarkerInfo
{
Position = pos,
Offset = DrawPosition,
Scale = Scale,
IconId = DrawHelpers.MapNoteIconId,
PrimaryText = () => note.Title ?? "",
SecondaryText = () => string.IsNullOrWhiteSpace(note.Description)
? note.GetTerritoryType().PlaceNameZone.Value.Name.ExtractText()
: $"{note.Description}\n{note.GetTerritoryType().PlaceNameZone.Value.Name.ExtractText()}",
OnLeftClicked = () => note.Focus(),
});
}
}
}