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 rotation helper drawing things.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 27, 2024
1 parent ab4c842 commit 15d5a05
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ActionTimelineEx/Configurations/Actions/GCDAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public float Draw(ImDrawListPtr drawList, Vector2 point, bool pass, ActionSettin
if (Plugin.Settings.DrawTime)
{
var width = ImGui.CalcTextSize(time.GetString()).X + 5;
drawList.AddText(point, uint.MaxValue, time.GetString());
drawList.AddText(point, uint.MaxValue, time.GetString() + " ");
point += Vector2.UnitX * width;
time += TimeSpan.FromSeconds(Gcd);
}
Expand Down
6 changes: 5 additions & 1 deletion ActionTimelineEx/Configurations/RotationSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public void Draw(float heightReduce)
var nextAction = RotationHelper.ActiveAction;

TimeSpan span = TimeSpan.Zero;
bool isNotFirst = false;

for (var i = 0; i < GCDs.Count; i++)
{
var item = GCDs[i];
Expand All @@ -72,7 +74,7 @@ public void Draw(float heightReduce)
continue;
}

if (Plugin.Settings.VerticalDraw && i != 0)
if (Plugin.Settings.VerticalDraw && isNotFirst)
{
pos.X = minPosX;

Expand All @@ -86,6 +88,8 @@ public void Draw(float heightReduce)
}
}

isNotFirst = true;

var width = item.Draw(drawList, pos, i < RotationHelper.GcdUsedCount, nextAction, ref span);

pos += new Vector2(width + spacing, 0);
Expand Down
2 changes: 1 addition & 1 deletion ActionTimelineEx/Configurations/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class Settings : IPluginConfiguration
[UI("Reverse Draw", Parent = nameof(VerticalDraw))]
public bool Reverse { get; set; } = false;

[UI("Draw Time", Parent = nameof(VerticalDraw))]
[UI("Draw Time", Parent = nameof(DrawRotation))]
public bool DrawTime { get; set; } = false;

[UI("Ignore Items", Parent = nameof(DrawRotation))]
Expand Down
5 changes: 3 additions & 2 deletions ActionTimelineEx/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@
"ActionTimelineEx.Configurations.Actions.ActionSettingType.Item": "Item",
"ActionTimelineEx.Configurations.Actions.oGCDActionDescription": "Inner Release (oGCD)",
"ActionTimelineEx.Configurations.Actions.ActionSetting": "ActionSetting",
"ActionTimelineEx.Configurations.Actions.ActionSettingDescription": "Heavy Swing (GCD)",
"ActionTimelineEx.Configurations.Actions.ActionSettingDescription": "Rage of Halone (GCD)",
"ActionTimelineEx.Configurations.Actions.ActionSettingName.ActionID": "Action ID",
"ActionTimelineEx.Configurations.Actions.GCDActionName.RecastOverride": "Recast override time",
"ActionTimelineEx.Configurations.SettingsName.GcdTime": "Gcd Time",
"ActionTimelineEx.Configurations.Actions.GCDActionName.GcdOverride": "Recast time override"
"ActionTimelineEx.Configurations.Actions.GCDActionName.GcdOverride": "Recast time override",
"ActionTimelineEx.Configurations.SettingsName.DrawTime": "Draw Time"
}

0 comments on commit 15d5a05

Please sign in to comment.