e160af2ab5
Made-with: Cursor
173 lines
8.0 KiB
C#
173 lines
8.0 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Numerics;
|
|
using System.Text.Json.Serialization;
|
|
using Dalamud.Interface;
|
|
using KamiLib.Configuration;
|
|
|
|
namespace Mappy.Data;
|
|
|
|
public enum CenterTarget
|
|
{
|
|
[Description("Disabled")]
|
|
Disabled = 0,
|
|
|
|
[Description("Player")]
|
|
Player = 1,
|
|
|
|
[Description("Map")]
|
|
Map = 2,
|
|
}
|
|
|
|
[Flags]
|
|
public enum FadeMode
|
|
{
|
|
[Description("Always")]
|
|
Always = 1 << 0,
|
|
|
|
[Description("When Moving")]
|
|
WhenMoving = 1 << 2,
|
|
|
|
[Description("When Focused")]
|
|
WhenFocused = 1 << 3,
|
|
|
|
[Description("When Unfocused")]
|
|
WhenUnFocused = 1 << 4,
|
|
}
|
|
|
|
public class SystemConfig : CharacterConfiguration
|
|
{
|
|
public bool UseLinearZoom = false;
|
|
public float ZoomSpeed = 0.25f;
|
|
public float IconScale = 0.50f;
|
|
public bool ShowMiscTooltips = true;
|
|
public bool HideWithGameGui = true;
|
|
public bool HideBetweenAreas = false;
|
|
public bool HideInCombat = false;
|
|
public bool KeepOpen = false;
|
|
public bool FollowOnOpen = false;
|
|
public bool FollowPlayer = true;
|
|
public CenterTarget CenterOnOpen = CenterTarget.Disabled;
|
|
public bool ScalePlayerCone = false;
|
|
public float ConeSize = 150.0f;
|
|
public bool ShowRadar = true;
|
|
public bool ShowRadarInDuties = false;
|
|
public Vector4 RadarColor = KnownColor.Gray.Vector() with { W = 0.10f };
|
|
public Vector4 RadarOutlineColor = KnownColor.Gray.Vector() with { W = 0.30f };
|
|
public bool HideWindowFrame = false;
|
|
public bool HideWindowBackground = false;
|
|
public bool EnableShiftDragMove = false;
|
|
public bool LockWindow = false;
|
|
public float FadePercent = 0.60f;
|
|
public FadeMode FadeMode = FadeMode.WhenUnFocused | FadeMode.WhenMoving;
|
|
public Vector2 WindowPosition = new(1024.0f, 700.0f);
|
|
public Vector2 WindowSize = new(500.0f, 500.0f);
|
|
public bool AlwaysShowToolbar = false;
|
|
public bool ShowToolbarOnHover = true;
|
|
public bool ScaleWithZoom = true;
|
|
public bool AcceptedSpoilerWarning = false;
|
|
public Vector4 AreaColor = KnownColor.CornflowerBlue.Vector() with { W = 0.33f };
|
|
public Vector4 AreaOutlineColor = KnownColor.CornflowerBlue.Vector() with { W = 0.30f };
|
|
public Vector4 PlayerConeColor = KnownColor.CornflowerBlue.Vector() with { W = 0.33f };
|
|
public Vector4 PlayerConeOutlineColor = KnownColor.CornflowerBlue.Vector() with { W = 1.0f };
|
|
public bool CenterOnFlag = true;
|
|
public bool CenterOnGathering = true;
|
|
public bool CenterOnQuest = true;
|
|
public bool LockCenterOnMap = false;
|
|
public bool ShowCoordinateBar = true;
|
|
public float ToolbarFade = 0.33f;
|
|
public float CoordinateBarFade = 0.66f;
|
|
public Vector4 CoordinateTextColor = KnownColor.White.Vector();
|
|
public bool ZoomLocked = false;
|
|
public bool ShowPlayers = true;
|
|
public bool SetFlagOnFateClick = false;
|
|
public bool ShowPlayerIcon = true;
|
|
public float PlayerIconScale = 1.0f;
|
|
public float MapScale = 1.0f;
|
|
public bool AutoZoom = false;
|
|
public bool ShowRegionLabel = true;
|
|
public bool ShowMapLabel = true;
|
|
public bool ShowAreaLabel = true;
|
|
public bool ShowSubAreaLabel = true;
|
|
public bool NoFocusOnAppear = false;
|
|
public float LargeAreaTextScale = 1.5f;
|
|
public float SmallAreaTextScale = 1.0f;
|
|
public bool ShowTextLabels = true;
|
|
public bool ShowFogOfWar = true;
|
|
public bool ScaleTextWithZoom = true;
|
|
public float AutoZoomScaleFactor = 0.33f;
|
|
|
|
public bool SuppressNativeMapOpenSound = true;
|
|
|
|
// Minimap
|
|
public bool ShowMinimap = false;
|
|
public float MinimapSize = 200.0f;
|
|
public Vector2 MinimapPosition = new(50.0f, 50.0f);
|
|
public float MinimapOpacity = 0.85f;
|
|
public float MinimapZoom = 0.112f; // 0.112 = max zoom out (see more map), lower = zoomed in (down to 0.03)
|
|
public bool MinimapShowPlayerCone = true;
|
|
public bool MinimapLockPosition = false;
|
|
/// <summary>Show an arrow at the edge of the minimap pointing toward the current quest objective or waymark (like the default minimap).</summary>
|
|
public bool MinimapShowQuestDirectionArrow = true;
|
|
/// <summary>Show direction arrows for nearby FATEs on the minimap (purple, matching FATE marker).</summary>
|
|
public bool MinimapShowFateDirectionArrows = true;
|
|
/// <summary>Show a red direction arrow pointing toward the player flag when it's off the minimap.</summary>
|
|
public bool MinimapShowFlagDirectionArrow = true;
|
|
/// <summary>Show quest objective area radius circles on the minimap (same as Area Map).</summary>
|
|
public bool MinimapShowQuestAreaRadius = true;
|
|
/// <summary>When true, minimap hides with the game GUI (dialogue, interaction, nameplates off). When false, minimap stays visible during dialogue and object interaction.</summary>
|
|
public bool MinimapHideWithGameGui = false;
|
|
/// <summary>Show Player/NPC tracking (other players, enemies, bosses, etc.) on the minimap, matching the main map display.</summary>
|
|
public bool MinimapShowPlayersAndNpcs = true;
|
|
/// <summary>Icon ID for other players on the minimap (default 60403, distinct from party 60421). Override if you prefer a different look.</summary>
|
|
public uint MinimapOtherPlayerIconId = 60403;
|
|
/// <summary>Show current map info (region, map, area, sub-area) at the top of the minimap.</summary>
|
|
public bool MinimapShowMapInfoBar = true;
|
|
/// <summary>Order of map info: 0=Region, 1=Map, 2=Area, 3=SubArea. e.g. {0,1,2,3} = Region, Map, Area, SubArea.</summary>
|
|
public int[] MinimapMapInfoOrder = [0, 1, 2, 3];
|
|
/// <summary>Font scale multiplier for map info bar (0.5-2.0).</summary>
|
|
public float MinimapMapInfoFontScale = 1.0f;
|
|
/// <summary>Text color for map info bar.</summary>
|
|
public Vector4 MinimapMapInfoColor = KnownColor.White.Vector();
|
|
/// <summary>Font type for map info: 0=Default, 1=Axis12, 2=Axis18.</summary>
|
|
public int MinimapMapInfoFontType = 0;
|
|
/// <summary>Background color (RGBA) for map info bar. Alpha = opacity.</summary>
|
|
public Vector4 MinimapMapInfoBarBackground = new(0f, 0f, 0f, 0.2f);
|
|
/// <summary>Show player coordinates at the bottom of the minimap.</summary>
|
|
public bool MinimapShowCoordinateBar = true;
|
|
/// <summary>Show coordinates in the bottom bar.</summary>
|
|
public bool MinimapCoordBarShowCoordinates = true;
|
|
/// <summary>Show local time in the bottom bar.</summary>
|
|
public bool MinimapCoordBarShowTime = true;
|
|
/// <summary>Show repair % (lowest equipped item condition) in the bottom bar.</summary>
|
|
public bool MinimapCoordBarShowRepairPercent = true;
|
|
/// <summary>Order of bottom bar elements: 0=Coordinates, 1=Repair %, 2=Local Time.</summary>
|
|
public int[] MinimapBottomBarOrder = [0, 1, 2];
|
|
/// <summary>Font scale multiplier for coordinate bar (0.5-2.0).</summary>
|
|
public float MinimapCoordBarFontScale = 1.0f;
|
|
/// <summary>Text color for coordinate bar.</summary>
|
|
public Vector4 MinimapCoordBarColor = KnownColor.White.Vector();
|
|
/// <summary>Font type for coord bar: 0=Default, 1=Axis12, 2=Axis18.</summary>
|
|
public int MinimapCoordBarFontType = 0;
|
|
/// <summary>Background color (RGBA) for coordinate bar. Alpha = opacity.</summary>
|
|
public Vector4 MinimapCoordBarBackground = new(0f, 0f, 0f, 0.2f);
|
|
|
|
// Movement Trail (Carbonite-style: show where you've been)
|
|
/// <summary>Draw a red trail of dots on the map showing where you've been.</summary>
|
|
public bool ShowMovementTrail = false;
|
|
/// <summary>Minimum distance (world units) before adding a new trail point.</summary>
|
|
public float MovementTrailMinDistance = 2f;
|
|
/// <summary>How long (seconds) trail points stay visible before fading out.</summary>
|
|
public float MovementTrailFadeTimeSeconds = 60f;
|
|
/// <summary>Maximum number of trail points to keep.</summary>
|
|
public int MovementTrailMaxPoints = 100;
|
|
|
|
// Do not persist this setting
|
|
[JsonIgnore]
|
|
public bool DebugMode = false;
|
|
|
|
public static SystemConfig Load() => Service.PluginInterface.LoadConfigFile<SystemConfig>("System.config.json");
|
|
|
|
public static void Save() => Service.PluginInterface.SaveConfigFile("System.config.json", System.SystemConfig);
|
|
} |