mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +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);
|
ImGui.SetWindowFocus(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Clear stacks"))
|
||||||
|
{
|
||||||
|
Service<InterfaceManager>.Get().ClearStacks();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.MenuItem("Dump style"))
|
if (ImGui.MenuItem("Dump style"))
|
||||||
{
|
{
|
||||||
var info = string.Empty;
|
var info = string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,15 @@ internal class InterfaceManager : IDisposable, IServiceType
|
||||||
return null;
|
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>
|
/// <summary>
|
||||||
/// Toggle Windows 11 immersive mode on the game window.
|
/// Toggle Windows 11 immersive mode on the game window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -892,6 +901,7 @@ internal class InterfaceManager : IDisposable, IServiceType
|
||||||
Log.Verbose("[FONT] ImGui.IO.Build will be called.");
|
Log.Verbose("[FONT] ImGui.IO.Build will be called.");
|
||||||
ioFonts.Build();
|
ioFonts.Build();
|
||||||
gameFontManager.AfterIoFontsBuild();
|
gameFontManager.AfterIoFontsBuild();
|
||||||
|
this.ClearStacks();
|
||||||
Log.Verbose("[FONT] ImGui.IO.Build OK!");
|
Log.Verbose("[FONT] ImGui.IO.Build OK!");
|
||||||
|
|
||||||
gameFontManager.AfterBuildFonts();
|
gameFontManager.AfterBuildFonts();
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 262d3b0668196fb236e2191c4a37e9be94e5a7a3
|
Subproject commit 99b735d7a7fe36aaf92c027c75173dd150871c6b
|
||||||
Loading…
Add table
Add a link
Reference in a new issue