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

Commit

Permalink
fix: speed of some config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 10, 2024
1 parent a05fac1 commit 1a5c572
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ActionTimelineEx/Configurations/DrawingSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class DrawingSettings
public int TimeOffsetSetting { get; set; } = 2;


[Range(-500, 500, ConfigUnitType.Pixels, 0.3f)]
[Range(-500, 500, ConfigUnitType.Pixels, 0.2f)]
[UI("Center Offset", (int)GroupItem.General)]
public float CenterOffset { get; set; } = 0;

Expand All @@ -66,7 +66,7 @@ public class DrawingSettings
[UI("Show Off GCD", (int)GroupItem.Icons)]
public bool ShowOGCD { get; set; } = true;

[Range(1, 100, ConfigUnitType.Pixels)]
[Range(1, 100, ConfigUnitType.Pixels, 0.2f)]
[UI("Off GCD Icon Size", (int)GroupItem.Icons, Parent = nameof(ShowOGCD))]
public int OGCDIconSize { get; set; } = 30;

Expand Down
4 changes: 2 additions & 2 deletions ActionTimelineEx/Timeline/TimelineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ private void DrawItemWithCenter(ImDrawListPtr drawList, Vector2 centerPos, Vecto

case TimelineLayer.General:
//Get Info.
float highPos = MathF.Min( setting.GCDHeight.X, setting.GCDHeight.Y);
float highPos = MathF.Min(setting.GCDHeight.X, setting.GCDHeight.Y);
float lowPos = MathF.Max(setting.GCDHeight.X, setting.GCDHeight.Y);
float rounding = setting.GCDRound;

var leftTop = centerPos + (highPos * iconSize - iconSize / 2) * setting.RealDownDirection;
var leftBottom = centerPos + (lowPos * iconSize- iconSize / 2) * setting.RealDownDirection;
var leftBottom = centerPos + (lowPos * iconSize - iconSize / 2) * setting.RealDownDirection;
var flag = ImDrawFlags.RoundCornersAll;

var min = centerPos + iconSize / 2 * setting.TimeDirection;
Expand Down

0 comments on commit 1a5c572

Please sign in to comment.