Class ImGuiComponents
Class containing various methods providing ImGui components.
Assembly: Dalamud.dll
View Source
public static class ImGuiComponents
Methods
ColorPickerWithPalette(int, string, Vector4)
ColorPicker with palette.
View Source
public static Vector4 ColorPickerWithPalette(int id, string description, Vector4 originalColor)
Returns
System.Numerics.Vector4
: Selected color.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | Id for the color picker. |
System.String | description | The description of the color picker. |
System.Numerics.Vector4 | originalColor | The current color. |
ColorPickerWithPalette(int, string, Vector4, ImGuiColorEditFlags)
ColorPicker with palette with color picker options.
View Source
public static Vector4 ColorPickerWithPalette(int id, string description, Vector4 originalColor, ImGuiColorEditFlags flags)
Returns
System.Numerics.Vector4
: Selected color.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | Id for the color picker. |
System.String | description | The description of the color picker. |
System.Numerics.Vector4 | originalColor | The current color. |
ImGuiNET.ImGuiColorEditFlags | flags | Flags 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
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
Type | Name | Description |
---|---|---|
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
System.Nullable<System.Int32> | id | The ID of the button. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The color of the button when hovered. |
System.Single | alphaMult | A 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
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
Type | Name | Description |
---|---|---|
System.String | labelWithId | The button label with ID. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The color of the button when hovered. |
System.Single | alphaMult | A multiplier for the current alpha levels. |
HelpMarker(string)
HelpMarker component to add a help icon with text on hover.
View Source
public static void HelpMarker(string helpText)
Parameters
Type | Name | Description |
---|---|---|
System.String | helpText | The text to display on hover. |
HelpMarker(string, FontAwesomeIcon)
HelpMarker component to add a custom icon with text on hover.
View Source
public static void HelpMarker(string helpText, FontAwesomeIcon icon)
Parameters
Type | Name | Description |
---|---|---|
System.String | helpText | The text to display on hover. |
Dalamud.Interface.FontAwesomeIcon | icon | The icon to use. |
IconButton(FontAwesomeIcon)
IconButton component to use an icon as a button.
View Source
public static bool IconButton(FontAwesomeIcon icon)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
IconButton(int, FontAwesomeIcon)
IconButton component to use an icon as a button.
View Source
public static bool IconButton(int id, FontAwesomeIcon icon)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the button. |
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
IconButton(string, FontAwesomeIcon)
IconButton component to use an icon as a button.
View Source
public static bool IconButton(string id, FontAwesomeIcon icon)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The ID of the button. |
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
IconButton(string)
IconButton component to use an icon as a button.
View Source
public static bool IconButton(string iconText)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
System.String | iconText | Text already containing the icon string. |
IconButton(FontAwesomeIcon, Vector4?, Vector4?, Vector4?)
IconButton component to use an icon as a button.
View Source
public static bool IconButton(FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The 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
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
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the button. |
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The 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
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
Type | Name | Description |
---|---|---|
System.String | id | The ID of the button. |
Dalamud.Interface.FontAwesomeIcon | icon | The icon for the button. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The 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
public static bool IconButton(string iconText, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
Returns
System.Boolean
: Indicator if button is clicked.
Parameters
Type | Name | Description |
---|---|---|
System.String | iconText | Text already containing the icon string. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The 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
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
Type | Name | Description |
---|---|---|
Dalamud.Interface.FontAwesomeIcon | icon | Icon to show. |
System.String | text | Text to show. |
System.Nullable<System.Numerics.Vector4> | defaultColor | The default color of the button. |
System.Nullable<System.Numerics.Vector4> | activeColor | The color of the button when active. |
System.Nullable<System.Numerics.Vector4> | hoveredColor | The color of the button when hovered. |
Test()
Test component to demonstrate how ImGui components work.
View Source
public static void Test()
TextWithLabel(string, string, string)
TextWithLabel component to show labeled text.
View Source
public static void TextWithLabel(string label, string value, string hint = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | label | The label for text. |
System.String | value | The text value. |
System.String | hint | The hint to show on hover. |
ToggleButton(string, ref bool)
Draw a toggle button.
View Source
public static bool ToggleButton(string id, ref bool v)
Returns
System.Boolean
: If the button has been interacted with this frame.
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id of the button. |
System.Boolean | v | The state of the switch. |
DisabledToggleButton(string, bool)
Draw a disabled toggle button.
View Source
public static void DisabledToggleButton(string id, bool v)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id of the button. |
System.Boolean | v | The state of the switch. |