This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a duty start or end event for macro usage.
- Loading branch information
1 parent
72cc363
commit fcfbd53
Showing
8 changed files
with
81 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
namespace RotationSolver.Configuration; | ||
using ImGuiNET; | ||
using RotationSolver.Localization; | ||
|
||
namespace RotationSolver.Configuration; | ||
|
||
public class ActionEventInfo : MacroInfo | ||
{ | ||
public string Name { get; set; } | ||
|
||
public string Name; | ||
|
||
public ActionEventInfo() | ||
{ | ||
Name = ""; | ||
} | ||
|
||
public override void DisplayMacro() | ||
{ | ||
if (ImGui.InputText($"{LocalizationManager.RightLang.Configwindow_Events_ActionName}##ActionName{GetHashCode()}", | ||
ref Name, 100)) | ||
{ | ||
Service.Configuration.Save(); | ||
} | ||
|
||
base.DisplayMacro(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Dalamud.Game.ClientState.Objects.Types; | ||
using FFXIVClientStructs.FFXIV.Client.UI.Misc; | ||
using ImGuiNET; | ||
using RotationSolver.Data; | ||
using RotationSolver.Helpers; | ||
using RotationSolver.Localization; | ||
using RotationSolver.Updaters; | ||
|
||
namespace RotationSolver.Configuration; | ||
|
||
public class MacroInfo | ||
{ | ||
public int MacroIndex { get; set; } | ||
public bool IsShared { get; set; } | ||
public int MacroIndex; | ||
public bool IsShared; | ||
|
||
public MacroInfo() | ||
{ | ||
MacroIndex = -1; | ||
IsShared = false; | ||
} | ||
|
||
public unsafe bool AddMacro(GameObject tar = null) | ||
{ | ||
if (MacroIndex < 0 || MacroIndex > 99) return false; | ||
|
||
MacroUpdater.Macros.Enqueue(new MacroItem(tar, IsShared ? | ||
RaptureMacroModule.Instance->Shared[MacroIndex] : | ||
RaptureMacroModule.Instance->Individual[MacroIndex])); | ||
|
||
return true; | ||
} | ||
|
||
public virtual void DisplayMacro() | ||
{ | ||
if (ImGui.DragInt($"{LocalizationManager.RightLang.Configwindow_Events_MacroIndex}##MacroIndex{GetHashCode()}", | ||
ref MacroIndex, 1, 0, 99)) | ||
{ | ||
Service.Configuration.Save(); | ||
} | ||
|
||
ImGui.SameLine(); | ||
ImGuiHelper.Spacing(); | ||
|
||
if (ImGui.Checkbox($"{LocalizationManager.RightLang.Configwindow_Events_ShareMacro}##ShareMacro{GetHashCode()}", | ||
ref IsShared)) | ||
{ | ||
Service.Configuration.Save(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters