Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 19, 2024
1 parent 8774a8e commit be19002
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ActionTimelineEx/Configurations/Actions/ActionSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public uint ActionId
}
}

[UI("Action ID")]
public int ActionID { get => (int) ActionId; set => ActionId = (uint)value; }

internal abstract ActionSettingType Type { get; }

[UI("Is this Action Highlight")]
Expand Down
9 changes: 9 additions & 0 deletions ActionTimelineEx/Configurations/Actions/GCDAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ public class GCDAction : ActionSetting
{
internal override ActionSettingType Type => ActionSettingType.Action;

[UI]
public string Display
{
get
{
return string.Empty;
}
}

[UI]
public List<oGCDAction> oGCDs { get; set; } = [];

Expand Down
12 changes: 10 additions & 2 deletions ActionTimelineEx/Helpers/RotationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ private static void UpdateHighlight()
_highLight.Color = Plugin.Settings.RotationHighlightColor;
_highLight.HotbarIDs.Clear();

var action = ActiveAction;
if (action == null) return;
ActionSetting? action = null;
try
{
action = ActiveAction;
}
catch
{
return;
}

if (action == null) return;
HotbarID? hotBar = null;

switch (action.Type)
Expand Down
8 changes: 7 additions & 1 deletion ActionTimelineEx/Windows/RotationHelperWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void Draw()
var flag = TimelineWindow._baseFlags;
if (setting.RotationLocked)
{
flag |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoMouseInputs;
flag |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove;
}

Vector4 bgColor = setting.RotationLocked ? setting.RotationLockedBackgroundColor : setting.RotationUnlockedBackgroundColor;
Expand All @@ -34,6 +34,12 @@ public static void Draw()

if (ImGui.Begin("Rotation Helper Window", flag))
{
//Double click to clear.
if (DrawHelper.IsInRect(ImGui.GetWindowPos(), ImGui.GetWindowSize()) && ImGui.IsMouseDoubleClicked(ImGuiMouseButton.Left))
{
RotationHelper.Clear();
}

var padding = ImGui.GetStyle().WindowPadding;
var border = ImGui.GetStyle().WindowBorderSize;
ImGui.GetStyle().WindowPadding = default;
Expand Down
1 change: 1 addition & 0 deletions ActionTimelineEx/Windows/TimelineWindow.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ActionTimelineEx.Configurations;
using ActionTimelineEx.Helpers;
using ActionTimelineEx.Timeline;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
Expand Down

0 comments on commit be19002

Please sign in to comment.