mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: clear font, style, color stack when fonts are rebuilt
This commit is contained in:
parent
46bf3c0c21
commit
69725bbfe9
3 changed files with 16 additions and 1 deletions
|
|
@ -802,6 +802,11 @@ internal class DalamudInterface : IDisposable, IServiceType
|
|||
ImGui.SetWindowFocus(null);
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Clear stacks"))
|
||||
{
|
||||
Service<InterfaceManager>.Get().ClearStacks();
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Dump style"))
|
||||
{
|
||||
var info = string.Empty;
|
||||
|
|
|
|||
|
|
@ -435,6 +435,15 @@ internal class InterfaceManager : IDisposable, IServiceType
|
|||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear font, style, and color stack. Dangerous, only use when you know
|
||||
/// no one else has something pushed they may try to pop.
|
||||
/// </summary>
|
||||
public void ClearStacks()
|
||||
{
|
||||
this.scene?.ClearStacksOnContext();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggle Windows 11 immersive mode on the game window.
|
||||
/// </summary>
|
||||
|
|
@ -892,6 +901,7 @@ internal class InterfaceManager : IDisposable, IServiceType
|
|||
Log.Verbose("[FONT] ImGui.IO.Build will be called.");
|
||||
ioFonts.Build();
|
||||
gameFontManager.AfterIoFontsBuild();
|
||||
this.ClearStacks();
|
||||
Log.Verbose("[FONT] ImGui.IO.Build OK!");
|
||||
|
||||
gameFontManager.AfterBuildFonts();
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 262d3b0668196fb236e2191c4a37e9be94e5a7a3
|
||||
Subproject commit 99b735d7a7fe36aaf92c027c75173dd150871c6b
|
||||
Loading…
Add table
Add a link
Reference in a new issue