mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 11:59:21 +01:00
feat: add ResizeBuffers event to UiBuilder
This commit is contained in:
parent
8820f84d2b
commit
395328eb17
2 changed files with 22 additions and 3 deletions
|
|
@ -133,10 +133,15 @@ namespace Dalamud.Interface.Internal
|
|||
private delegate void InstallRTSSHook();
|
||||
|
||||
/// <summary>
|
||||
/// This event gets called by a plugin UiBuilder when read
|
||||
/// This event gets called each frame to facilitate ImGui drawing.
|
||||
/// </summary>
|
||||
public event RawDX11Scene.BuildUIDelegate Draw;
|
||||
|
||||
/// <summary>
|
||||
/// This event gets called when ResizeBuffers is called.
|
||||
/// </summary>
|
||||
public event Action ResizeBuffers;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an action that is executed when fonts are rebuilt.
|
||||
/// </summary>
|
||||
|
|
@ -545,6 +550,8 @@ namespace Dalamud.Interface.Internal
|
|||
Log.Verbose($"Calling resizebuffers swap@{swapChain.ToInt64():X}{bufferCount} {width} {height} {newFormat} {swapChainFlags}");
|
||||
#endif
|
||||
|
||||
this.ResizeBuffers?.Invoke();
|
||||
|
||||
// We have to ensure we're working with the main swapchain,
|
||||
// as viewports might be resizing as well
|
||||
if (this.scene == null || swapChain != this.scene.SwapChain.NativePointer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue