diff --git a/ActionTimelineEx/Configurations/Settings.cs b/ActionTimelineEx/Configurations/Settings.cs index 47f9874..be55a62 100644 --- a/ActionTimelineEx/Configurations/Settings.cs +++ b/ActionTimelineEx/Configurations/Settings.cs @@ -80,6 +80,9 @@ public class Settings : IPluginConfiguration [UI("Draw the rotation Vertically", Parent = nameof(DrawRotation))] public bool VerticalDraw { get; set; } = false; + [UI("Reverse Draw", Parent = nameof(VerticalDraw))] + public bool Reverse { get; set; } = false; + [JsonIgnore] [TimelineChoices] [UI("Rotation Choice", 3)] diff --git a/ActionTimelineEx/Helpers/RotationHelper.cs b/ActionTimelineEx/Helpers/RotationHelper.cs index 5425c07..8b9008e 100644 --- a/ActionTimelineEx/Helpers/RotationHelper.cs +++ b/ActionTimelineEx/Helpers/RotationHelper.cs @@ -14,7 +14,7 @@ internal static class RotationHelper private static DrawingHighlightHotbar? _highLight; public static ActionSetting? ActiveAction => Actions.FirstOrDefault(); - public static IEnumerable Actions => RotationSetting.Actions.Skip((int)Count); + public static IEnumerable Actions => RotationSetting.Actions.Skip((int)Count); public static RotationSetting RotationSetting => Plugin.Settings.RotationHelper.RotationSetting; diff --git a/ActionTimelineEx/Localization/Localization.json b/ActionTimelineEx/Localization/Localization.json index 7f8764e..61fa980 100644 --- a/ActionTimelineEx/Localization/Localization.json +++ b/ActionTimelineEx/Localization/Localization.json @@ -134,5 +134,5 @@ "ActionTimelineEx.Configurations.ActionSettingType.Action": "Action", "ActionTimelineEx.Configurations.ActionSettingType.Item": "Item", "ActionTimelineEx.Configurations.ActionSettingName.IsLast": "Is the Last Ability during GCD", - "ActionTimelineEx.Configurations.ActionSettingDescription": "Circle of Scorn (Ability)" + "ActionTimelineEx.Configurations.ActionSettingDescription": "Heavy Swing (GCD)" } \ No newline at end of file diff --git a/ActionTimelineEx/Windows/RotationHelperItem.cs b/ActionTimelineEx/Windows/RotationHelperItem.cs index 43a81f4..4e080cc 100644 --- a/ActionTimelineEx/Windows/RotationHelperItem.cs +++ b/ActionTimelineEx/Windows/RotationHelperItem.cs @@ -59,7 +59,7 @@ public override void Draw(ConfigWindow window) _group ??= new CollapsingHeaderGroup(new() { { () => UiString.RotationSetting.Local(), () => DrawSetting(window) }, - { () => UiString.Rotation.Local(), () => DrawRotation(window, setting)}, + { () => UiString.Rotation.Local(), () => DrawRotation(window)}, }); _group.Draw(); @@ -71,8 +71,10 @@ private static void DrawSetting(ConfigWindow window) window.Collection.DrawItems(1); } - private static void DrawRotation(ConfigWindow window, RotationsSetting setting) + private static void DrawRotation(ConfigWindow window) { + var setting = Plugin.Settings.RotationHelper; + if (ImGui.Button(UiString.RotationReset.Local())) { RotationHelper.Clear(); diff --git a/ActionTimelineEx/Windows/RotationHelperWindow.cs b/ActionTimelineEx/Windows/RotationHelperWindow.cs index 7500014..5ed6c9b 100644 --- a/ActionTimelineEx/Windows/RotationHelperWindow.cs +++ b/ActionTimelineEx/Windows/RotationHelperWindow.cs @@ -53,9 +53,14 @@ private static void DrawContent() var drawList = ImGui.GetWindowDrawList(); var pos = ImGui.GetWindowPos() + new Vector2(gcdHeight * 0.2f, - Plugin.Settings.VerticalDraw ? gcdHeight * 0.2f : ImGui.GetWindowSize().Y / 2 - gcdHeight / 2); + Plugin.Settings.VerticalDraw + ? (Plugin.Settings.Reverse + ? ImGui.GetWindowSize().Y - gcdHeight * 1.4f + : gcdHeight * 0.2f) + : ImGui.GetWindowSize().Y / 2 - gcdHeight / 2); var maxX = ImGui.GetWindowPos().X + ImGui.GetWindowSize().X; - var maxY = ImGui.GetWindowPos().Y + ImGui.GetWindowSize().Y; + var minY = ImGui.GetWindowPos().Y; + var maxY = minY + ImGui.GetWindowSize().Y; var minPosX = pos.X; bool isFirst = true; @@ -66,7 +71,15 @@ private static void DrawContent() if (item.IsGCD && Plugin.Settings.VerticalDraw && !isFirst) { pos.X = minPosX; - pos.Y += gcdHeight + spacing; + + if (Plugin.Settings.Reverse) + { + pos.Y -= gcdHeight + spacing; + } + else + { + pos.Y += gcdHeight + spacing; + } } item.Draw(drawList, pos, size); @@ -78,7 +91,7 @@ private static void DrawContent() pos += new Vector2(size + spacing, 0); - if (pos.X >= maxX || pos.Y >= maxY) break; + if (pos.X >= maxX || pos.Y >= maxY || pos.Y <= minY) break; } } } diff --git a/ECommons b/ECommons index 2a75dae..3878596 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 2a75dae7e20ff6943589154e69a2f8e352a34832 +Subproject commit 387859644f09f11af5c4005e3827f49a7b4c95fc diff --git a/XIVConfigUI b/XIVConfigUI index 9513339..ff3bf50 160000 --- a/XIVConfigUI +++ b/XIVConfigUI @@ -1 +1 @@ -Subproject commit 95133396d8b714ded7446bc10d283446209cc09f +Subproject commit ff3bf50d8b73e4c349f45aa480e3a27a6c984e80