Interface IWindow
Represents a ImGui window for use with the built-in Dalamud.Interface.Windowing.WindowSystem.
Assembly: Dalamud.dll​
public interface IWindow
Derived:
Dalamud.Interface.Windowing.Window
Properties​
Namespace​
Gets or sets the namespace of the window.
string? Namespace { get; set; }
WindowName​
Gets or sets the name of the window. If you have multiple windows with the same name, you will need to append an unique ID to it by specifying it after "###" behind the window title.
string WindowName { get; set; }
IsFocused​
Gets or sets a value indicating whether the window is focused.
bool IsFocused { get; set; }
IsHovered​
Gets or sets a value indicating whether the window is hovered.
bool IsHovered { get; set; }
RespectCloseHotkey​
Gets or sets a value indicating whether this window is to be closed with a hotkey, like Escape, and keep game addons open in turn if it is closed.
bool RespectCloseHotkey { get; set; }
InhibitAtkCollision​
Gets or sets a value indicating whether this window inhibits the game cursor from interacting with native elements underneath the hovered window.
bool InhibitAtkCollision { get; set; }
Remarks​
This is feature is disabled when Gamepad Mode is enabled.
DisableWindowSounds​
Gets or sets a value indicating whether this window should not generate sound effects when opening and closing.
bool DisableWindowSounds { get; set; }
OnOpenSfxId​
Gets or sets a value representing the sound effect id to be played when the window is opened.
uint OnOpenSfxId { get; set; }
OnCloseSfxId​
Gets or sets a value representing the sound effect id to be played when the window is closed.
uint OnCloseSfxId { get; set; }
DisableFadeInFadeOut​
Gets or sets a value indicating whether this window should not fade in and out, regardless of the users' preference.
bool DisableFadeInFadeOut { get; set; }
Position​
Gets or sets the position of this window.
Vector2? Position { get; set; }
PositionCondition​
Gets or sets the condition that defines when the position of this window is set.
ImGuiCond PositionCondition { get; set; }
Size​
Gets or sets the size of the window. The size provided will be scaled by the global scale.
Vector2? Size { get; set; }
SizeCondition​
Gets or sets the condition that defines when the size of this window is set.
ImGuiCond SizeCondition { get; set; }
SizeConstraints​
Gets or sets the size constraints of the window. The size constraints provided will be scaled by the global scale.
WindowSizeConstraints? SizeConstraints { get; set; }
Collapsed​
Gets or sets a value indicating whether this window is collapsed.
bool? Collapsed { get; set; }
CollapsedCondition​
Gets or sets the condition that defines when the collapsed state of this window is set.
ImGuiCond CollapsedCondition { get; set; }
Flags​
Gets or sets the window flags.
ImGuiWindowFlags Flags { get; set; }
ForceMainWindow​
Gets or sets a value indicating whether this ImGui window will be forced to stay inside the main game window.
bool ForceMainWindow { get; set; }
BgAlpha​
Gets or sets this window's background alpha value.
float? BgAlpha { get; set; }
ShowCloseButton​
Gets or sets a value indicating whether this ImGui window should display a close button in the title bar.
bool ShowCloseButton { get; set; }
AllowPinning​
Gets or sets a value indicating whether this window should offer to be pinned via the window's titlebar context menu.
bool AllowPinning { get; set; }
AllowClickthrough​
Gets or sets a value indicating whether this window should offer to be made click-through via the window's titlebar context menu.
bool AllowClickthrough { get; set; }
AllowBackgroundBlur​
Gets or sets a value indicating whether this window should apply a blur effect to the background behind it when drawn, if the user has enabled this feature globally.
bool AllowBackgroundBlur { get; set; }
IsPinned​
Gets or sets a value indicating whether this window is pinned.
bool IsPinned { get; set; }
IsClickthrough​
Gets or sets a value indicating whether this window is click-through.
bool IsClickthrough { get; set; }
IsTopMost​
Gets or sets a value indicating whether this window is top-most. Only applies to windows that are not on the main viewport.
bool IsTopMost { get; set; }
TitleBarButtons​
Gets or sets a list of available title bar buttons.
If Dalamud.Interface.Windowing.IWindow.AllowPinning or Dalamud.Interface.Windowing.IWindow.AllowClickthrough are set to true, and this features is not disabled globally by the user, an internal title bar button to manage these is added when drawing, but it will not appear in this collection. If you wish to remove this button, set both of these values to false.
List<TitleBarButton> TitleBarButtons { get; set; }
IsOpen​
Gets or sets a value indicating whether this window will stay open.
bool IsOpen { get; set; }
RequestFocus​
Gets or sets a value indicating whether this window will request focus from the window system next frame.
bool RequestFocus { get; set; }
Methods​
Toggle()​
Toggle window is open state.
void Toggle()
BringToFront()​
Bring this window to the front.
void BringToFront()
PreOpenCheck()​
Code to always be executed before the open-state of the window is checked.
void PreOpenCheck()
DrawConditions()​
Additional conditions for the window to be drawn, regardless of its open-state.
bool DrawConditions()
Returns​
System.Boolean: True if the window should be drawn, false otherwise.
Remarks​
Not being drawn due to failing this condition will not change focus or trigger OnClose. This is checked before PreDraw, but after Update.
PreDraw()​
Code to be executed before conditionals are applied and the window is drawn.
void PreDraw()
PostDraw()​
Code to be executed after the window is drawn.
void PostDraw()
Draw()​
Code to be executed every time the window renders.
void Draw()
Remarks​
In this method, implement your drawing code. You do NOT need to ImGui.Begin your window.
OnOpen()​
Code to be executed when the window is opened.
void OnOpen()
OnClose()​
Code to be executed when the window is closed.
void OnClose()
OnSafeToRemove()​
Code to be executed when the window is safe to be disposed or removed from the window system. Doing so in Dalamud.Interface.Windowing.IWindow.OnClose() may result in animations not playing correctly.
void OnSafeToRemove()
Update()​
Code to be executed every frame, even when the window is collapsed.
void Update()