mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 21:37:43 +01:00
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip * hacky fix for overlapping event text in profiler * move IsResumeGameAfterPluginLoad logic to PluginManager * fix some warnings * handle exceptions properly * remove ability to cancel, rename button to "hide" instead * undo Dalamud.Service refactor for now * warnings * add explainer, show which plugins are still loading * add some text if loading takes more than 3 minutes * undo wrong CS merge
This commit is contained in:
parent
93adea0ac9
commit
448b0d16ea
294 changed files with 560 additions and 506 deletions
|
|
@ -190,6 +190,9 @@ public class ProfilerWindow : Window
|
|||
|
||||
uint eventTextDepth = maxRectDept + 2;
|
||||
|
||||
var eventsXPos = new List<float>();
|
||||
const float eventsXPosFudge = 5f;
|
||||
|
||||
foreach (var timingEvent in Timings.Events)
|
||||
{
|
||||
var startX = (timingEvent.StartTime - this.min) / (this.max - this.min) * width;
|
||||
|
|
@ -214,11 +217,19 @@ public class ProfilerWindow : Window
|
|||
{
|
||||
textPos.X = pos.X + (uint)startX - textSize.X - padding;
|
||||
}
|
||||
|
||||
var numClashes = eventsXPos.Count(x => Math.Abs(x - textPos.X) < textSize.X + eventsXPosFudge);
|
||||
if (numClashes > 0)
|
||||
{
|
||||
textPos.Y -= numClashes * textSize.Y;
|
||||
}
|
||||
|
||||
ImGui.GetWindowDrawList().AddText(
|
||||
textPos,
|
||||
ImGui.GetColorU32(ImGuiColors.DalamudWhite),
|
||||
timingEvent.Name);
|
||||
|
||||
eventsXPos.Add(textPos.X);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue