Class Window
Base class you can use to implement an ImGui window for use with the built-in WindowSystem.
Inheritance
Inherited Members
Namespace: Dalamud.Interface.Windowing
Assembly: Dalamud.dll
Syntax
public abstract class Window
Constructors
| Improve this Doc View SourceWindow(String, ImGuiWindowFlags, Boolean)
Initializes a new instance of the Window class.
Declaration
protected Window(string name, ImGuiWindowFlags flags = ImGuiWindowFlags.None, bool forceMainWindow = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name/ID of this 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. |
| ImGuiWindowFlags | flags | The ImGuiWindowFlags of this window. |
| System.Boolean | forceMainWindow | Whether or not this window should be limited to the main game window. |
Properties
| Improve this Doc View SourceBgAlpha
Gets or sets this window's background alpha value.
Declaration
public float? BgAlpha { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Single> |
Collapsed
Gets or sets a value indicating whether or not this window is collapsed.
Declaration
public bool? Collapsed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
CollapsedCondition
Gets or sets the condition that defines when the collapsed state of this window is set.
Declaration
public ImGuiCond CollapsedCondition { get; set; }
Property Value
| Type | Description |
|---|---|
| ImGuiCond |
Flags
Gets or sets the window flags.
Declaration
public ImGuiWindowFlags Flags { get; set; }
Property Value
| Type | Description |
|---|---|
| ImGuiWindowFlags |
ForceMainWindow
Gets or sets a value indicating whether or not this ImGui window will be forced to stay inside the main game window.
Declaration
public bool ForceMainWindow { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsOpen
Gets or sets a value indicating whether or not this window will stay open.
Declaration
public bool IsOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Namespace
Declaration
public string Namespace { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Position
Gets or sets the position of this window.
Declaration
public Vector2? Position { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Numerics.Vector2> |
PositionCondition
Gets or sets the condition that defines when the position of this window is set.
Declaration
public ImGuiCond PositionCondition { get; set; }
Property Value
| Type | Description |
|---|---|
| ImGuiCond |
Size
Gets or sets the size of the window.
Declaration
public Vector2? Size { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Numerics.Vector2> |
SizeCondition
Gets or sets the condition that defines when the size of this window is set.
Declaration
public ImGuiCond SizeCondition { get; set; }
Property Value
| Type | Description |
|---|---|
| ImGuiCond |
SizeConstraintsMax
Gets or sets the maximum size of this window.
Declaration
public Vector2? SizeConstraintsMax { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Numerics.Vector2> |
SizeConstraintsMin
Gets or sets the minimum size of this window.
Declaration
public Vector2? SizeConstraintsMin { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Numerics.Vector2> |
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.
Declaration
public string WindowName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceDraw()
In this method, implement your drawing code. You do NOT need to ImGui.Begin your window.
Declaration
public abstract void Draw()
OnClose()
Code to be executed when the window is closed.
Declaration
public virtual void OnClose()
OnOpen()
Code to be executed when the window is opened.
Declaration
public virtual void OnOpen()