mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 14:27:45 +01:00
Merge pull request #1070 from MidoriKami/master
ImGuiComponents IconButton Improvements
This commit is contained in:
commit
34d3efb4b3
1 changed files with 22 additions and 1 deletions
|
|
@ -26,6 +26,15 @@ public static partial class ImGuiComponents
|
||||||
public static bool IconButton(int id, FontAwesomeIcon icon)
|
public static bool IconButton(int id, FontAwesomeIcon icon)
|
||||||
=> IconButton(id, icon, null, null, null);
|
=> 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>
|
/// <summary>
|
||||||
/// IconButton component to use an icon as a button.
|
/// IconButton component to use an icon as a button.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -55,7 +64,19 @@ public static partial class ImGuiComponents
|
||||||
/// <param name="hoveredColor">The color of the button when hovered.</param>
|
/// <param name="hoveredColor">The color of the button when hovered.</param>
|
||||||
/// <returns>Indicator if button is clicked.</returns>
|
/// <returns>Indicator if button is clicked.</returns>
|
||||||
public static bool IconButton(int id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
|
public static bool IconButton(int id, FontAwesomeIcon icon, Vector4? defaultColor = null, Vector4? activeColor = null, Vector4? hoveredColor = null)
|
||||||
=> IconButton($"{icon.ToIconString()}{id}", defaultColor, activeColor, hoveredColor);
|
=> 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>
|
/// <summary>
|
||||||
/// IconButton component to use an icon as a button with color options.
|
/// IconButton component to use an icon as a button with color options.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue