Add tooltip for when going above 100% iterations
This commit is contained in:
@@ -411,17 +411,17 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
||||
|
||||
var percentWidth = ImGui.CalcTextSize("100%").X;
|
||||
var progressWidth = availSpace - percentWidth - spacing;
|
||||
var fraction = Math.Clamp((float)solver.ProgressValue / solver.ProgressMax, 0, 1);
|
||||
var fraction = (float)solver.ProgressValue / solver.ProgressMax;
|
||||
var progressColors = Colors.GetSolverProgressColors(solver.ProgressStage);
|
||||
|
||||
|
||||
using (ImRaii.PushColor(ImGuiCol.FrameBg, progressColors.Background))
|
||||
using (ImRaii.PushColor(ImGuiCol.PlotHistogram, progressColors.Foreground))
|
||||
ImGui.ProgressBar(fraction, new(progressWidth, ImGui.GetFrameHeight()), string.Empty);
|
||||
ImGui.ProgressBar(Math.Clamp(fraction, 0, 1), new(progressWidth, ImGui.GetFrameHeight()), string.Empty);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.Tooltip($"Solver Progress: {solver.ProgressValue} / {solver.ProgressMax}");
|
||||
RecipeNote.DrawSolverTooltip(solver);
|
||||
ImGui.SameLine(0, spacing);
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGuiUtils.TextRight($"{fraction * 100:0}%", percentWidth);
|
||||
ImGuiUtils.TextRight($"{fraction * 100:N0}%", percentWidth);
|
||||
}
|
||||
|
||||
private void DrawMacroActions()
|
||||
|
||||
Reference in New Issue
Block a user