Class ImGuiHelpers
Class containing various helper methods for use with ImGui inside Dalamud.
Inheritance
System.Object
ImGuiHelpers
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 static class ImGuiHelpers
Properties
| Improve this Doc View SourceGlobalScale
Gets the global Dalamud scale.
Declaration
public static float GlobalScale { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
MainViewport
Gets the main viewport.
Declaration
public static ImGuiViewportPtr MainViewport { get; }
Property Value
| Type | Description |
|---|---|
| ImGuiViewportPtr |
Methods
| Improve this Doc View SourceForceNextWindowMainViewport()
Force the next ImGui window to stay inside the main game window.
Declaration
public static void ForceNextWindowMainViewport()
ScaledDummy(Vector2)
Create a dummy scaled by the global Dalamud scale.
Declaration
public static void ScaledDummy(Vector2 size)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Numerics.Vector2 | size | The size of the dummy. |
ScaledRelativeSameLine(Single, Single)
Use a relative ImGui.SameLine() from your current cursor position, scaled by the Dalamud global scale.
Declaration
public static void ScaledRelativeSameLine(float offset, float spacing = -1F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | offset | The offset from your current cursor position. |
| System.Single | spacing | The spacing to use. |
SetNextWindowPosRelativeMainViewport(Vector2, ImGuiCond, Vector2)
Set the position of the next window relative to the main viewport.
Declaration
public static void SetNextWindowPosRelativeMainViewport(Vector2 position, ImGuiCond condition = ImGuiCond.None, Vector2 pivot = default(Vector2))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Numerics.Vector2 | position | The position of the next window. |
| ImGuiCond | condition | When to set the position. |
| System.Numerics.Vector2 | pivot | The pivot to set the position around. |
SetWindowPosRelativeMainViewport(String, Vector2, ImGuiCond)
Set the position of a window relative to the main viewport.
Declaration
public static void SetWindowPosRelativeMainViewport(string name, Vector2 position, ImGuiCond condition = ImGuiCond.None)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name/ID of the window. |
| System.Numerics.Vector2 | position | The position of the window. |
| ImGuiCond | condition | When to set the position. |