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

Commit

Permalink
fix: fixed rotation window timeline showcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 19, 2023
1 parent 1e362df commit d423b6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
9 changes: 6 additions & 3 deletions ActionTimelineEx/Timeline/TimelineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ private void AddItem(TimelineItem item)
_items.Dequeue();
}
_items.Enqueue(item);
if (item.Type != TimelineItemType.AutoAttack) _lastItem = item;
_lastTime = DateTime.Now;
UpdateEndTime(item.EndTime);
if (item.Type != TimelineItemType.AutoAttack)
{
_lastItem = item;
_lastTime = DateTime.Now;
UpdateEndTime(item.EndTime);
}
}

private void UpdateEndTime(DateTime endTime)
Expand Down
4 changes: 2 additions & 2 deletions ActionTimelineEx/Windows/SettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ private bool RemoveValue(string name)

private bool DrawGeneralTab(DrawingSettings settings)
{
ImGui.InputText("Name: ", ref settings.Name, 32);
var result = Plugin.Settings.TimelineSettings.Any() ? RemoveValue(settings.Name) : false;
ImGui.InputText("Name", ref settings.Name, 32);
var result = Plugin.Settings.TimelineSettings.Count > 1 ? RemoveValue(settings.Name) : false;

ImGui.Checkbox("Enable", ref settings.Enable);
ImGui.Checkbox("Is Rotation", ref settings.IsRotation);
Expand Down
1 change: 0 additions & 1 deletion ActionTimelineEx/Windows/TimelineWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ private static void DrawGrid(Vector2 pos, Vector2 size, DrawingSettings setting)
drawList.AddLine(new Vector2(start, pos.Y), new Vector2(start, pos.Y + height), lineColor, setting.GridLineWidth);
}

if (setting.IsRotation) time -= setting.TimeOffsetSetting;
if (setting.GridShowSecondsText)
{
drawList.AddText(new Vector2(start + 2, pos.Y), lineColor, $" {time}s");
Expand Down

0 comments on commit d423b6e

Please sign in to comment.