SHA256
Add Render Waiting Visualization
This commit is contained in:
1 parent
c16fe25e7d
commit
f807eae382
2 files changed
+15
-9
No files matched your search
@@ -17,8 +17,16 @@ namespace ADOFAIRenderer.Patch.ClassPatch
|
||||
{
|
||||
if (!RenderMod.IsRendering) return;
|
||||
|
||||
___txt.text = "Rendering";
|
||||
if (RenderManager.Countdown > 0) ___txt.text += $" in {RenderManager.Countdown}..";
|
||||
___txt.text = "Rendering...";
|
||||
if (RenderManager.Countdown > 0) ___txt.text = $"Rendering in {RenderManager.Countdown}..";
|
||||
|
||||
if (RenderManager.WonFrame != -1)
|
||||
{
|
||||
var elapsedFrames = RenderManager.FrameCount - RenderManager.WonFrame;
|
||||
var remainingTime = RenderManager.Configuration.EndWaitTime - elapsedFrames / RenderManager.Configuration.TargetFPS;
|
||||
if (remainingTime < 0) remainingTime = 0;
|
||||
___txt.text += $"\nWaiting for {remainingTime:F1}s...";
|
||||
}
|
||||
|
||||
___txt.color = ___defaultColor;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user