Skip to content

Commit aca59a6

Browse files
committed
API13
1 parent 0540d9f commit aca59a6

File tree

6 files changed

+20
-48
lines changed

6 files changed

+20
-48
lines changed

PositionalGuide/ConfigWindow.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
using System.Numerics;
44
using System.Runtime.InteropServices;
55

6+
using Dalamud.Bindings.ImGui;
67
using Dalamud.Interface;
78
using Dalamud.Interface.Utility;
89
using Dalamud.Interface.Windowing;
910

10-
using ImGuiNET;
11-
1211
namespace VariableVixen.PositionalGuide;
1312

1413
public class ConfigWindow: Window, IDisposable {
@@ -261,19 +260,19 @@ public override void Draw() {
261260
// sliders for numeric modifiers to the lines being drawn
262261
ImGui.PushItemWidth(470 * scale);
263262

264-
changed |= ImGui.SliderScalar("Guideline size modifier", ImGuiDataType.S16, ptrs[0], this.minModifierPtr, this.maxModifierPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
263+
changed |= ImGui.SliderScalar("Guideline size modifier", ImGuiDataType.S16, ref ptrs[0], this.minModifierPtr, this.maxModifierPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
265264
utils.Tooltip("The positional guidelines normally extend from the target's centre point out to the size of their hitbox. This allows you to make them longer or shorter.");
266265

267-
changed |= ImGui.SliderScalar("Minimum guideline size", ImGuiDataType.U16, ptrs[1], this.minBoundingPtr, this.maxBoundingPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
266+
changed |= ImGui.SliderScalar("Minimum guideline size", ImGuiDataType.U16, ref ptrs[1], this.minBoundingPtr, this.maxBoundingPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
268267
utils.Tooltip("Guidelines will always be drawn to at least this length, even if they would ordinarily have been smaller.");
269268

270-
changed |= ImGui.SliderScalar("Maximum guideline size", ImGuiDataType.U16, ptrs[2], this.minBoundingPtr, this.maxBoundingPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
269+
changed |= ImGui.SliderScalar("Maximum guideline size", ImGuiDataType.U16, ref ptrs[2], this.minBoundingPtr, this.maxBoundingPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
271270
utils.Tooltip("Guidelines will never be longer than this, no matter how big the target's hitbox is.");
272271

273-
changed |= ImGui.SliderScalar("Line thickness", ImGuiDataType.U16, ptrs[3], this.minThicknessPtr, this.maxThicknessPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
272+
changed |= ImGui.SliderScalar("Line thickness", ImGuiDataType.U16, ref ptrs[3], this.minThicknessPtr, this.maxThicknessPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
274273
utils.Tooltip("How wide/thick do you want the lines to be?");
275274

276-
changed |= ImGui.SliderScalar("Outer circle range", ImGuiDataType.U16, ptrs[4], this.minOuterCircleRangePtr, this.maxOuterCircleRangePtr, "%i", ImGuiSliderFlags.AlwaysClamp);
275+
changed |= ImGui.SliderScalar("Outer circle range", ImGuiDataType.U16, ref ptrs[4], this.minOuterCircleRangePtr, this.maxOuterCircleRangePtr, "%i", ImGuiSliderFlags.AlwaysClamp);
277276
utils.Tooltip("How big should the outer circle be?"
278277
+ "\n"
279278
+ "\nValue is an offset to the target circle, and a value of 10 corresponds to 1 yalm."
@@ -282,12 +281,12 @@ public override void Draw() {
282281
// sliders specifically to control the tether line length
283282
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, tether ? 1 : InactiveOptionAlpha);
284283

285-
changed |= ImGui.SliderScalar("Tether inner max length", ImGuiDataType.S16, ptrs[5], this.negativeOnePtr, this.maxTetherLengthPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
284+
changed |= ImGui.SliderScalar("Tether inner max length", ImGuiDataType.S16, ref ptrs[5], this.negativeOnePtr, this.maxTetherLengthPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
286285
utils.Tooltip("The inner tether will never extend beyond the centre of the target's hitbox."
287286
+ "\n"
288287
+ "\nSet to -1 to always go to the centre of the target's hitbox.");
289288

290-
changed |= ImGui.SliderScalar("Tether outer max length", ImGuiDataType.S16, ptrs[6], this.negativeTwoPtr, this.maxTetherLengthPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
289+
changed |= ImGui.SliderScalar("Tether outer max length", ImGuiDataType.S16, ref ptrs[6], this.negativeTwoPtr, this.maxTetherLengthPtr, "%i", ImGuiSliderFlags.AlwaysClamp);
291290
utils.Tooltip("The outer tether CAN extend beyond your hitbox."
292291
+ "\n"
293292
+ "\nSet to -1 to always go to the centre of the your hitbox."

PositionalGuide/ImGuitils.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
using Dalamud.Bindings.ImGui;
12
using Dalamud.Interface.Utility;
23

3-
using ImGuiNET;
4-
54
namespace VariableVixen.PositionalGuide;
65

76
internal class ImGuitils {

PositionalGuide/Plugin.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Linq;
44
using System.Numerics;
55

6+
using Dalamud.Bindings.ImGui;
67
using Dalamud.Game.ClientState.Objects;
78
using Dalamud.Game.ClientState.Objects.Enums;
89
using Dalamud.Game.ClientState.Objects.SubKinds;
@@ -15,8 +16,6 @@
1516
using Dalamud.Plugin.Services;
1617
using Dalamud.Utility.Numerics;
1718

18-
using ImGuiNET;
19-
2019
namespace VariableVixen.PositionalGuide;
2120

2221
public class Plugin: IDalamudPlugin {
@@ -80,7 +79,7 @@ private void settingsUpdated() {
8079
this.updateCircleColours();
8180
}
8281

83-
private void dtrClickHandler() {
82+
private void dtrClickHandler(DtrInteractionEvent e) {
8483
this.Config.Enabled = !this.Config.Enabled;
8584
this.setDtrText();
8685
}

PositionalGuide/PositionalGuide.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
2+
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
33
<PropertyGroup>
44
<Product>PositionalGuide</Product>
55
<Version>4.7.1</Version>

PositionalGuide/dalamud.props

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,20 @@
99
<Deterministic>false</Deterministic>
1010
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1111
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
12-
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
1312
</PropertyGroup>
1413

1514
<Import Project="framework.props" />
1615

17-
<ItemGroup>
18-
<Reference Include="Newtonsoft.Json">
19-
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
20-
<Private>False</Private>
21-
</Reference>
22-
<Reference Include="Dalamud">
23-
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
24-
<Private>False</Private>
25-
</Reference>
26-
<Reference Include="ImGui.NET">
27-
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
28-
<Private>False</Private>
29-
</Reference>
16+
<!--ItemGroup>
3017
<Reference Include="ImGuiScene">
3118
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
3219
<Private>False</Private>
3320
</Reference>
34-
<Reference Include="Lumina">
35-
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
36-
<Private>False</Private>
37-
</Reference>
38-
<Reference Include="Lumina.Excel">
39-
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
40-
<Private>False</Private>
41-
</Reference>
42-
<Reference Include="FFXIVClientStructs">
43-
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
44-
<Private>False</Private>
45-
</Reference>
4621
<Reference Include="InteropGenerator.Runtime">
4722
<HintPath>$(DalamudLibPath)InteropGenerator.Runtime.dll</HintPath>
4823
<Private>False</Private>
4924
</Reference>
50-
</ItemGroup>
25+
</ItemGroup-->
5126

5227
<ItemGroup>
5328
<None Remove="dalamud.props" />

PositionalGuide/packages.lock.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net9.0-windows7.0": {
55
"DalamudPackager": {
66
"type": "Direct",
7-
"requested": "[12.0.0, )",
8-
"resolved": "12.0.0",
9-
"contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw=="
7+
"requested": "[13.0.0, )",
8+
"resolved": "13.0.0",
9+
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
1010
},
1111
"DotNet.ReproducibleBuilds": {
1212
"type": "Direct",
@@ -16,9 +16,9 @@
1616
},
1717
"Microsoft.NET.ILLink.Tasks": {
1818
"type": "Direct",
19-
"requested": "[9.0.2, )",
20-
"resolved": "9.0.2",
21-
"contentHash": "+KFnCLVPicEq99ko0tq+ycTvNLXHw0tImmTZjPloB/DOFLPT56KLfk5aS7wbgXRPzYhXTTBYLGaABea5mke77w=="
19+
"requested": "[9.0.7, )",
20+
"resolved": "9.0.7",
21+
"contentHash": "SZ1brSGoLnhLbE8QUZrtN6YwzN2gDT1wbx9qDBEfFFJcstiDTjJ6ygNuTPBV/K7SjGfx2YNbcJi5+ygbPOZpDg=="
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)