Skip to content
Open
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
10 changes: 5 additions & 5 deletions ResizableHUD/AddonManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal class AddonManager
private static Vector2 LastMousePos = Vector2.Zero;

public static unsafe bool CheckIfInConfig(AtkUnitBase* unit) {
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig();
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig()!;
return config.Any(node => node.Name == unit->NameString);
}

Expand Down Expand Up @@ -65,7 +65,7 @@ public static unsafe void AddToConfig(AtkUnitBase* unit) {
return;
}

List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig();
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig()!;
config.Add(GetAddonConfig(unit));
config.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase));
}
Expand Down Expand Up @@ -118,7 +118,7 @@ public static unsafe void UpdateAddon(ref ResNodeConfig node) {
}

public static void UpdateAddons() {
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig();
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig()!;

if (config == null) {
return;
Expand All @@ -131,7 +131,7 @@ public static void UpdateAddons() {
}

public static void DrawAddonNodes() {
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig();
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig()!;

if (config == null) {
return;
Expand Down Expand Up @@ -200,7 +200,7 @@ public static void DrawAddonNodes() {
}

private static string FindClosestMatch(string input) {
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig();
List<ResNodeConfig> config = Globals.Config.GetCurrentNodeConfig()!;
string closestMatch = "";
int minDifference = int.MaxValue;

Expand Down
2 changes: 1 addition & 1 deletion ResizableHUD/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public override unsafe void Draw() {
}
WindowDrawHelpers.DrawTooltip("Save config");

WindowDrawHelpers.DrawCheckboxTooltip("Draw Addon Inspector", ref Globals.Config.DrawAddonInspector, "When enabled, you will see an overlay of addons (UI elements). Pressing Right Mouse will bring up a context menu with the addons that are under your mouse. Clicking on one of these will add it to the list");
WindowDrawHelpers.DrawCheckboxTooltip("Draw Addon Inspector", ref Globals.Config!.DrawAddonInspector, "When enabled, you will see an overlay of addons (UI elements). Pressing Right Mouse will bring up a context menu with the addons that are under your mouse. Clicking on one of these will add it to the list");
if (Globals.Config.DrawAddonInspector) {
WindowDrawHelpers.DrawCheckboxTooltip("Draw Only Visible", ref Globals.Config.OnlyPeekVisible, "When enabled, the addon inspector will only draw addons that are marked as visible");
}
Expand Down
15 changes: 6 additions & 9 deletions ResizableHUD/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class Configuration : IPluginConfiguration {
#endregion

public List<ResNodeConfig>? GetCurrentNodeConfig() {
ulong cid = Service.ClientState.LocalContentId;
ulong cid = Service.PlayerState.ContentId;
if (CIDNodeConfigMap.ContainsKey(cid)) {
return CIDNodeConfigMap[cid];
}
Expand All @@ -62,7 +62,7 @@ public class Configuration : IPluginConfiguration {
}

public void Initialize() {
ulong cid = Service.ClientState.LocalContentId;
ulong cid = Service.PlayerState.ContentId;

if (nodeConfigs != null) {
CIDNodeConfigMap.Add(cid, nodeConfigs);
Expand All @@ -79,13 +79,10 @@ public void Initialize() {
foreach (List<ResNodeConfig> node_config in CIDNodeConfigMap.Values) {
// upgrade old config
foreach (ResNodeConfig config in node_config) {
if (config != null) {
if (config.DoNotPosition == null) {
config.DoNotPosition = false;
}
if (config.DoNotScale == null) {
config.DoNotScale = false;
}
if (config != null)
{
config.DoNotPosition = false;
config.DoNotScale = false;

if (config.Attachment == null) {
config.Attachment = "";
Expand Down
4 changes: 2 additions & 2 deletions ResizableHUD/ResizableHUD.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
<Project Sdk="Dalamud.NET.Sdk/14.0.1">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>preview</LangVersion>
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>
Expand Down
16 changes: 8 additions & 8 deletions ResizableHUD/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"version": 1,
"dependencies": {
"net9.0": {
"net10.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[13.0.0, )",
"resolved": "13.0.0",
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
"requested": "[14.0.1, )",
"resolved": "14.0.1",
"contentHash": "y0WWyUE6dhpGdolK3iKgwys05/nZaVf4ZPtIjpLhJBZvHxkkiE23zYRo7K7uqAgoK/QvK5cqF6l3VG5AbgC6KA=="
},
"DotNet.ReproducibleBuilds": {
"type": "Direct",
"requested": "[1.2.25, )",
"resolved": "1.2.25",
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
"requested": "[1.2.39, )",
"resolved": "1.2.39",
"contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
},
"drahsidlib": {
"type": "Project",
"dependencies": {
"DalamudPackager": "[13.0.0, )"
"DalamudPackager": "[14.0.1, )"
}
}
}
Expand Down