v1.0.0.15: Top/Bottom Info Bars, Repair %, order, fonts, colors
Made-with: Cursor
This commit is contained in:
@@ -145,6 +145,21 @@ public unsafe partial class MapRenderer : IDisposable
|
||||
/// </summary>
|
||||
public bool HasMinimapCacheFor(uint mapId) => _minimapCache.ContainsKey(mapId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the map transform (offsetX, offsetY, sizeFactor) for the current minimap map, for coordinate display.
|
||||
/// Returns null if no cache exists for CurrentMapId.
|
||||
/// </summary>
|
||||
public (int offsetX, int offsetY, uint sizeFactor)? GetCurrentMinimapTransform()
|
||||
{
|
||||
var agent = AgentMap.Instance();
|
||||
var currentMapId = agent->CurrentMapId;
|
||||
if (currentMapId == 0 || !_minimapCache.TryGetValue(currentMapId, out var entry))
|
||||
return null;
|
||||
var sizeFactor = (uint)Math.Round(entry.ScaleFactor * 100f);
|
||||
if (sizeFactor == 0) sizeFactor = 100;
|
||||
return ((int)entry.OffsetX, (int)entry.OffsetY, sizeFactor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to load map texture and transform from Lumina (Map sheet) so the minimap can draw without opening the area map.
|
||||
/// Uses game map path conventions (ui/map/...) and Map.SizeFactor, Map.OffsetX/Y. On success, fills the cache for this map.
|
||||
|
||||
Reference in New Issue
Block a user