Skip to main content

Class ImGuiComponents

Class containing various methods providing ImGui components.

Assembly: Dalamud.dll
View Source
Declaration
public static class ImGuiComponents

Methods

ColorPickerWithPalette(int, string, Vector4)

ColorPicker with palette.

View Source
Declaration
public static Vector4 ColorPickerWithPalette(int id, string description, Vector4 originalColor)
Returns

System.Numerics.Vector4: Selected color.

Parameters
TypeNameDescription
System.Int32idId for the color picker.
System.StringdescriptionThe description of the color picker.
System.Numerics.Vector4originalColorThe current color.

ColorPickerWithPalette(int, string, Vector4, ImGuiColorEditFlags)

ColorPicker with palette with color picker options.

View Source
Declaration
public static Vector4 ColorPickerWithPalette(int id, string description, Vector4 originalColor, ImGuiColorEditFlags flags)
Returns

System.Numerics.Vector4: Selected color.

Parameters
TypeNameDescription
System.Int32idId for the color picker.
System.StringdescriptionThe description of the color picker.
System.Numerics.Vector4originalColorThe current color.
ImGuiNET.ImGuiColorEditFlagsflagsFlags to customize color picker.

DisabledButton(FontAwesomeIcon, int?, Vector4?, Vector4?, Vector4?, float)

Alpha modified IconButton component to use an icon as a button with alpha and color options.

View Source
Declaration
public static bool DisabledButton(FontAwesomeIcon icon, int? id = null, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null, float alphaMult = 0.5)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.
System.Nullable<System.Int32>idThe ID of the button.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.
System.SinglealphaMultA multiplier for the current alpha levels.

DisabledButton(string, Vector4?, Vector4?, Vector4?, float)

Alpha modified Button component to use as a disabled button with alpha and color options.

View Source
Declaration
public static bool DisabledButton(string labelWithId, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null, float alphaMult = 0.5)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.StringlabelWithIdThe button label with ID.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.
System.SinglealphaMultA multiplier for the current alpha levels.

HelpMarker(string)

HelpMarker component to add a help icon with text on hover.

View Source
Declaration
public static void HelpMarker(string helpText)
Parameters
TypeNameDescription
System.StringhelpTextThe text to display on hover.

HelpMarker(string, FontAwesomeIcon)

HelpMarker component to add a custom icon with text on hover.

View Source
Declaration
public static void HelpMarker(string helpText, FontAwesomeIcon icon)
Parameters
TypeNameDescription
System.StringhelpTextThe text to display on hover.
Dalamud.Interface.FontAwesomeIconiconThe icon to use.

IconButton(FontAwesomeIcon)

IconButton component to use an icon as a button.

View Source
Declaration
public static bool IconButton(FontAwesomeIcon icon)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.

IconButton(int, FontAwesomeIcon)

IconButton component to use an icon as a button.

View Source
Declaration
public static bool IconButton(int id, FontAwesomeIcon icon)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.Int32idThe ID of the button.
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.

IconButton(string, FontAwesomeIcon)

IconButton component to use an icon as a button.

View Source
Declaration
public static bool IconButton(string id, FontAwesomeIcon icon)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.StringidThe ID of the button.
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.

IconButton(string)

IconButton component to use an icon as a button.

View Source
Declaration
public static bool IconButton(string iconText)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.StringiconTextText already containing the icon string.

IconButton(FontAwesomeIcon, Vector4?, Vector4?, Vector4?)

IconButton component to use an icon as a button.

View Source
Declaration
public static bool IconButton(FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.

IconButton(int, FontAwesomeIcon, Vector4?, Vector4?, Vector4?)

IconButton component to use an icon as a button with color options.

View Source
Declaration
public static bool IconButton(int id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.Int32idThe ID of the button.
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.

IconButton(string, FontAwesomeIcon, Vector4?, Vector4?, Vector4?)

IconButton component to use an icon as a button with color options.

View Source
Declaration
public static bool IconButton(string id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.StringidThe ID of the button.
Dalamud.Interface.FontAwesomeIconiconThe icon for the button.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.

IconButton(string, Vector4?, Vector4?, Vector4?)

IconButton component to use an icon as a button with color options.

View Source
Declaration
public static bool IconButton(string iconText, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
System.StringiconTextText already containing the icon string.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.

IconButtonWithText(FontAwesomeIcon, string, Vector4?, Vector4?, Vector4?)

IconButton component to use an icon as a button with color options.

View Source
Declaration
public static bool IconButtonWithText(FontAwesomeIcon icon, string text, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns

System.Boolean: Indicator if button is clicked.

Parameters
TypeNameDescription
Dalamud.Interface.FontAwesomeIconiconIcon to show.
System.StringtextText to show.
System.Nullable<System.Numerics.Vector4>defaultColorThe default color of the button.
System.Nullable<System.Numerics.Vector4>activeColorThe color of the button when active.
System.Nullable<System.Numerics.Vector4>hoveredColorThe color of the button when hovered.

Test()

Test component to demonstrate how ImGui components work.

View Source
Declaration
public static void Test()

TextWithLabel(string, string, string)

TextWithLabel component to show labeled text.

View Source
Declaration
public static void TextWithLabel(string label, string value, string hint = "")
Parameters
TypeNameDescription
System.StringlabelThe label for text.
System.StringvalueThe text value.
System.StringhintThe hint to show on hover.

ToggleButton(string, ref bool)

Draw a toggle button.

View Source
Declaration
public static bool ToggleButton(string id, ref bool v)
Returns

System.Boolean: If the button has been interacted with this frame.

Parameters
TypeNameDescription
System.StringidThe id of the button.
System.BooleanvThe state of the switch.

DisabledToggleButton(string, bool)

Draw a disabled toggle button.

View Source
Declaration
public static void DisabledToggleButton(string id, bool v)
Parameters
TypeNameDescription
System.StringidThe id of the button.
System.BooleanvThe state of the switch.