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

Commit

Permalink
fix: add next action overlay drawing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 4, 2024
1 parent 4a8163a commit 7da8ba0
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions RotationSolver/UI/NextActionWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,35 @@ public override void PostDraw()
base.PostDraw();
}

public override void Draw()
public override unsafe void Draw()
{
var width = Service.Config.ControlWindowGCDSize
* Service.Config.ControlWindowNextSizeRatio;
DrawGcdCooldown(width, false);
ControlWindow.DrawIAction(ActionUpdater.NextAction, width, 1);

var precent = 0f;

var group = ActionManager.Instance()->GetRecastGroupDetail(ActionHelper.GCDCooldownGroup - 1);
if (group ->Elapsed == group->Total || group->Total == 0)
{
precent = 1;
}
else
{
precent = group->Elapsed / group->Total;
if(ActionUpdater.NextAction != ActionUpdater.NextGCDAction)
{
precent++;
}
}

ControlWindow.DrawIAction(ActionUpdater.NextAction, width, precent);
}

public static unsafe void DrawGcdCooldown(float width, bool drawTittle)
{
var group = ActionManager.Instance()->GetRecastGroupDetail(ActionHelper.GCDCooldownGroup - 1);

var remain = group->Total - group->Elapsed;
var total = DataCenter.WeaponTotal;

Expand Down

0 comments on commit 7da8ba0

Please sign in to comment.