Skip to content

Commit

Permalink
More API 9 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Oct 3, 2023
1 parent 45e25da commit 39eeca7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
[submodule "lib/FFXIVClientStructs"]
path = lib/FFXIVClientStructs
url = https://github.com/aers/FFXIVClientStructs.git
[submodule "ECommons"]
path = ECommons
url = https://github.com/NightmareXIV/ECommons.git
1 change: 1 addition & 0 deletions ECommons
Submodule ECommons added at 1ad0de
12 changes: 10 additions & 2 deletions XIVSlothCombo.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32228.343
# Visual Studio Version 17
VisualStudioVersion = 17.8.34112.27
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XIVSlothCombo", "XIVSlothCombo\XIVSlothCombo.csproj", "{619DF476-7225-4783-95A5-D29A8816EE66}"
EndProject
Expand All @@ -17,6 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github Actions", "Github Ac
.github\workflows\build.yml = .github\workflows\build.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{3E8E720E-9990-4202-9035-12F54C78CF47}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -30,6 +32,12 @@ Global
{619DF476-7225-4783-95A5-D29A8816EE66}.GitBuild|x64.Build.0 = GitBuild|x64
{619DF476-7225-4783-95A5-D29A8816EE66}.Release|x64.ActiveCfg = Release|x64
{619DF476-7225-4783-95A5-D29A8816EE66}.Release|x64.Build.0 = Release|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Debug|x64.ActiveCfg = Debug|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Debug|x64.Build.0 = Debug|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.ActiveCfg = Debug|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.Build.0 = Debug|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.ActiveCfg = Release|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion XIVSlothCombo/CustomCombo/Functions/Cooldown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ internal abstract partial class CustomComboFunctions
/// <summary> Get if an action is enabled.</summary>
/// <param name="actionID"> Action ID to check</param>
/// <returns> If the action is currently enabled.</returns>
public unsafe static bool IsEnabled(uint actionID) => ActionManager.Instance()->GetActionStatus(ActionType.Spell, actionID) == 0;
public unsafe static bool IsEnabled(uint actionID) => ActionManager.Instance()->GetActionStatus(ActionType.Action, actionID) == 0;
}
}
2 changes: 1 addition & 1 deletion XIVSlothCombo/Data/CustomComboCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ internal static unsafe int GetResourceCost(uint actionID)
if (actionManager == null)
return 0;

int cost = ActionManager.GetActionCost(ActionType.Spell, actionID, 0, 0, 0, 0);
int cost = ActionManager.GetActionCost(ActionType.Action, actionID, 0, 0, 0, 0);

return cost;
}
Expand Down
3 changes: 2 additions & 1 deletion XIVSlothCombo/Window/IconTextButton.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Interface;
using Dalamud.Interface.Internal;
using ECommons.ImGuiMethods;
using ImGuiNET;
using ImGuiScene;
Expand All @@ -16,7 +17,7 @@ private static Vector2 GetIconSize(FontAwesomeIcon icon)
return iconSize;
}

public static bool IconImageButton(TextureWrap texture, string text, Vector2 size = new(), bool imageOnRight = false, float imageScale = 0)
public static bool IconImageButton(IDalamudTextureWrap texture, string text, Vector2 size = new(), bool imageOnRight = false, float imageScale = 0)
{
var buttonClicked = false;

Expand Down
3 changes: 2 additions & 1 deletion XIVSlothCombo/Window/Tabs/AboutUs.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Utility;
using Dalamud.Plugin;
using Dalamud.Utility;
Expand All @@ -18,7 +19,7 @@ internal class AboutUs : ConfigWindow
{
public static Version version = null!;

private static Dictionary<string, TextureWrap> Images = new();
private static Dictionary<string, IDalamudTextureWrap> Images = new();
internal static void Draw()
{
version ??= Assembly.GetExecutingAssembly().GetName().Version!;
Expand Down
5 changes: 4 additions & 1 deletion XIVSlothCombo/XIVSlothCombo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@

<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.10" />
<PackageReference Include="ECommons" Version="2.0.0.2" />
<PackageReference Include="ILRepack" Version="2.0.18" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ECommons\ECommons\ECommons.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
Expand Down

0 comments on commit 39eeca7

Please sign in to comment.