Better solver progress colors & add recipenote solver progress

This commit is contained in:
Asriel Camora
2024-02-23 01:20:46 -08:00
parent e9d6467f01
commit 337d42fd6e
5 changed files with 92 additions and 18 deletions
+5 -2
View File
@@ -387,8 +387,11 @@ 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);
using (var color = ImRaii.PushColor(ImGuiCol.PlotHistogram, ImGuiColors.DalamudGrey3))
ImGui.ProgressBar(fraction, new(progressWidth, ImGui.GetFrameHeight()), string.Empty);
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);
if (ImGui.IsItemHovered())
ImGuiUtils.Tooltip($"Solver Progress: {solver.ProgressValue} / {solver.ProgressMax}");
ImGui.SameLine(0, spacing);