mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Add ShowCloseButton property to Window to allow hiding the close button. (#906)
This commit is contained in:
parent
47a130b32c
commit
2045aa9228
1 changed files with 6 additions and 1 deletions
|
|
@ -104,6 +104,11 @@ namespace Dalamud.Interface.Windowing
|
|||
/// </summary>
|
||||
public float? BgAlpha { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not this ImGui window should display a close button in the title bar.
|
||||
/// </summary>
|
||||
public bool ShowCloseButton { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not this window will stay open.
|
||||
/// </summary>
|
||||
|
|
@ -236,7 +241,7 @@ namespace Dalamud.Interface.Windowing
|
|||
ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, focusedHeaderColor);
|
||||
}
|
||||
|
||||
if (ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags))
|
||||
if (this.ShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags) : ImGui.Begin(this.WindowName, this.Flags))
|
||||
{
|
||||
// Draw the actual window contents
|
||||
this.Draw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue