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
View Source
public abstract class Window
Properties
Namespace
Gets or sets the namespace of the window.
View Source
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.
View Source
public string WindowName { get; set; }
IsFocused
Gets a value indicating whether the window is focused.
View Source
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.
View Source
public bool RespectCloseHotkey { get; set; }
DisableWindowSounds
Gets or sets a value indicating whether this window should not generate sound effects when opening and closing.
View Source
public bool DisableWindowSounds { get; set; }
OnOpenSfxId
Gets or sets a value representing the sound effect id to be played when the window is opened.
View Source
public uint OnOpenSfxId { get; set; }
OnCloseSfxId
Gets or sets a value representing the sound effect id to be played when the window is closed.
View Source
public uint OnCloseSfxId { get; set; }
Position
Gets or sets the position of this window.
View Source
public Vector2? Position { get; set; }
PositionCondition
Gets or sets the condition that defines when the position of this window is set.
View Source
public ImGuiCond PositionCondition { get; set; }
Size
Gets or sets the size of the window. The size provided will be scaled by the global scale.
View Source
public Vector2? Size { get; set; }
SizeCondition
Gets or sets the condition that defines when the size of this window is set.
View Source
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.
View Source
public Window.WindowSizeConstraints? SizeConstraints { get; set; }
Collapsed
Gets or sets a value indicating whether or not this window is collapsed.
View Source
public bool? Collapsed { get; set; }
CollapsedCondition
Gets or sets the condition that defines when the collapsed state of this window is set.
View Source
public ImGuiCond CollapsedCondition { get; set; }
Flags
Gets or sets the window flags.
View Source
public ImGuiWindowFlags Flags { get; set; }
ForceMainWindow
Gets or sets a value indicating whether or not this ImGui window will be forced to stay inside the main game window.
View Source
public bool ForceMainWindow { get; set; }
BgAlpha
Gets or sets this window's background alpha value.
View Source
public float? BgAlpha { get; set; }
ShowCloseButton
Gets or sets a value indicating whether or not this ImGui window should display a close button in the title bar.
View Source
public bool ShowCloseButton { get; set; }
AllowPinning
Gets or sets a value indicating whether or not this window should offer to be pinned via the window's titlebar context menu.
View Source
public bool AllowPinning { get; set; }
AllowClickthrough
Gets or sets a value indicating whether or not this window should offer to be made click-through via the window's titlebar context menu.
View Source
public bool AllowClickthrough { get; set; }
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.
View Source
public List<Window.TitleBarButton> TitleBarButtons { get; set; }
IsOpen
Gets or sets a value indicating whether or not this window will stay open.
View Source
public bool IsOpen { get; set; }
Methods
Toggle()
Toggle window is open state.
View Source
public void Toggle()
BringToFront()
Bring this window to the front.
View Source
public void BringToFront()
PreOpenCheck()
Code to always be executed before the open-state of the window is checked.
View Source
public virtual void PreOpenCheck()
DrawConditions()
Additional conditions for the window to be drawn, regardless of its open-state.
View Source
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.
View Source
public virtual void PreDraw()
PostDraw()
Code to be executed after the window is drawn.
View Source
public virtual void PostDraw()
Draw()
Code to be executed every time the window renders.
View Source
public abstract void Draw()
OnOpen()
Code to be executed when the window is opened.
View Source
public virtual void OnOpen()
OnClose()
Code to be executed when the window is closed.
View Source
public virtual void OnClose()
Update()
Code to be executed every frame, even when the window is collapsed.
View Source
public virtual void Update()