mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
Add IconButton overloads
This commit is contained in:
parent
5c5b15810b
commit
9beea21864
1 changed files with 21 additions and 0 deletions
|
|
@ -26,6 +26,15 @@ public static partial class ImGuiComponents
|
|||
public static bool IconButton(int id, FontAwesomeIcon icon)
|
||||
=> IconButton(id, icon, null, null, null);
|
||||
|
||||
/// <summary>
|
||||
/// IconButton component to use an icon as a button.
|
||||
/// </summary>
|
||||
/// <param name="id">The ID of the button.</param>
|
||||
/// <param name="icon">The icon for the button.</param>
|
||||
/// <returns>Indicator if button is clicked.</returns>
|
||||
public static bool IconButton(string id, FontAwesomeIcon icon)
|
||||
=> IconButton(id, icon, null, null, null);
|
||||
|
||||
/// <summary>
|
||||
/// IconButton component to use an icon as a button.
|
||||
/// </summary>
|
||||
|
|
@ -57,6 +66,18 @@ public static partial class ImGuiComponents
|
|||
public static bool IconButton(int id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
|
||||
=> IconButton($"{icon.ToIconString()}##{id}", defaultColor, activeColor, hoveredColor);
|
||||
|
||||
/// <summary>
|
||||
/// IconButton component to use an icon as a button with color options.
|
||||
/// </summary>
|
||||
/// <param name="id">The ID of the button.</param>
|
||||
/// <param name="icon">The icon for the button.</param>
|
||||
/// <param name="defaultColor">The default color of the button.</param>
|
||||
/// <param name="activeColor">The color of the button when active.</param>
|
||||
/// <param name="hoveredColor">The color of the button when hovered.</param>
|
||||
/// <returns>Indicator if button is clicked.</returns>
|
||||
public static bool IconButton(string id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
|
||||
=> IconButton($"{icon.ToIconString()}##{id}", defaultColor, activeColor, hoveredColor);
|
||||
|
||||
/// <summary>
|
||||
/// IconButton component to use an icon as a button with color options.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue