mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
feat: ImGuiHelpers.GetButtonSize()
This commit is contained in:
parent
59ba3bdd07
commit
b779ac5674
2 changed files with 9 additions and 4 deletions
|
|
@ -105,6 +105,13 @@ namespace Dalamud.Interface
|
|||
return colorPalette;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the size of a button considering the default frame padding.
|
||||
/// </summary>
|
||||
/// <param name="text">Text in the button.</param>
|
||||
/// <returns><see cref="Vector2"/> with the size of the button.</returns>
|
||||
public static Vector2 GetButtonSize(string text) => ImGui.CalcTextSize(text) + (ImGui.GetStyle().FramePadding * 2);
|
||||
|
||||
/// <summary>
|
||||
/// Get data needed for each new frame.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue