Show / Hide Table of Contents

# Class UiBuilder

This class represents the Dalamud UI that is drawn on top of the game. It can be used to draw custom windows and overlays.

##### Inheritance

System.Object
UiBuilder

##### Implements

System.IDisposable

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Dalamud.Interface

###### Assembly: Dalamud.dll

##### Syntax

    public class UiBuilder : IDisposable

### Constructors

| Improve this Doc View Source

#### UiBuilder(InterfaceManager, String)

Create a new UiBuilder and register it. You do not have to call this manually.

##### Declaration

    public UiBuilder(InterfaceManager interfaceManager, string namespaceName)

##### Parameters

Type | Name | Description
--- | --- | ---
InterfaceManager | interfaceManager | The interface manager to register on.
System.String | namespaceName | The plugin namespace.

### Fields

| Improve this Doc View Source

#### OnOpenConfigUi

Event that is fired when the plugin should open its configuration interface.

##### Declaration

    public EventHandler OnOpenConfigUi

##### Field Value

Type | Description
--- | ---
System.EventHandler |

### Methods

| Improve this Doc View Source

#### Dispose()

Unregister the UiBuilder. Do not call this in plugin code.

##### Declaration

    public void Dispose()

| Improve this Doc View Source

#### LoadImage(Byte[])

Loads an image from a byte stream, such as a png downloaded into memory.

##### Declaration

    public TextureWrap LoadImage(byte[] imageData)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | imageData | A byte array containing the raw image data.

##### Returns

Type | Description
--- | ---
TextureWrap | A TextureWrap object wrapping the created image. Use ImGuiHandle inside ImGui.Image()

| Improve this Doc View Source

#### LoadImage(String)

Loads an image from the specified file.

##### Declaration

    public TextureWrap LoadImage(string filePath)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | filePath | The full filepath to the image.

##### Returns

Type | Description
--- | ---
TextureWrap | A TextureWrap object wrapping the created image. Use ImGuiHandle inside ImGui.Image()

### Events

| Improve this Doc View Source

#### OnBuildUi

The delegate that gets called when Dalamud is ready to draw your windows or overlays. When it is called, you can use static ImGui calls.

##### Declaration

    public event RawDX11Scene.BuildUIDelegate OnBuildUi

##### Event Type

Type | Description
--- | ---
RawDX11Scene.BuildUIDelegate |

### Implements

System.IDisposable