Class Window
Base class you can use to implement an ImGui window for use with the built-in Dalamud.Interface.Windowing.WindowSystem.
Assembly: Dalamud.dll
public abstract class Window
Properties
Namespace
Gets or sets the namespace of the window.
public 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.
public string WindowName { get; set; }
IsFocused
Gets a value indicating whether the window is focused.
public bool IsFocused { get; }
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.
public bool RespectCloseHotkey { get; set; }
DisableWindowSounds
Gets or sets a value indicating whether this window should not generate sound effects when opening and closing.
public bool DisableWindowSounds { get; set; }
OnOpenSfxId
Gets or sets a value representing the sound effect id to be played when the window is opened.
public uint OnOpenSfxId { get; set; }
OnCloseSfxId
Gets or sets a value representing the sound effect id to be played when the window is closed.
public 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.
public bool DisableFadeInFadeOut { get; set; }
Position
Gets or sets the position of this window.
public Vector2? Position { get; set; }
PositionCondition
Gets or sets the condition that defines when the position of this window is set.
public ImGuiCond PositionCondition { get; set; }
Size
Gets or sets the size of the window. The size provided will be scaled by the global scale.
public Vector2? Size { get; set; }
SizeCondition
Gets or sets the condition that defines when the size of this window is set.
public 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.
public Window.WindowSizeConstraints? SizeConstraints { get; set; }
Collapsed
Gets or sets a value indicating whether this window is collapsed.
public bool? Collapsed { get; set; }
CollapsedCondition
Gets or sets the condition that defines when the collapsed state of this window is set.
public ImGuiCond CollapsedCondition { get; set; }
Flags
Gets or sets the window flags.
public 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.
public bool ForceMainWindow { get; set; }
BgAlpha
Gets or sets this window's background alpha value.
public float? BgAlpha { get; set; }
ShowCloseButton
Gets or sets a value indicating whether this ImGui window should display a close button in the title bar.
public 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.
public 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.
public bool AllowClickthrough { get; set; }
IsPinned
Gets a value indicating whether this window is pinned.
public bool IsPinned { get; }
IsClickthrough
Gets a value indicating whether this window is click-through.
public bool IsClickthrough { get; }
TitleBarButtons
Gets or sets a list of available title bar buttons.
If Dalamud.Interface.Windowing.Window.AllowPinning or Dalamud.Interface.Windowing.Window.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.
public List<Window.TitleBarButton> TitleBarButtons { get; set; }
IsOpen
Gets or sets a value indicating whether this window will stay open.
public bool IsOpen { get; set; }
Methods
Toggle()
Toggle window is open state.
public void Toggle()
BringToFront()
Bring this window to the front.
public void BringToFront()
PreOpenCheck()
Code to always be executed before the open-state of the window is checked.
public virtual void PreOpenCheck()
DrawConditions()
Additional conditions for the window to be drawn, regardless of its open-state.
public virtual bool DrawConditions()
Returns
System.Boolean: True if the window should be drawn, false otherwise.
PreDraw()
Code to be executed before conditionals are applied and the window is drawn.
public virtual void PreDraw()
PostDraw()
Code to be executed after the window is drawn.
public virtual void PostDraw()
Draw()
Code to be executed every time the window renders.
public abstract void Draw()
OnOpen()
Code to be executed when the window is opened.
public virtual void OnOpen()
OnClose()
Code to be executed when the window is closed.
public virtual 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.Window.OnClose() may result in animations not playing correctly.
public virtual void OnSafeToRemove()
Update()
Code to be executed every frame, even when the window is collapsed.
public virtual void Update()