Skip to content

Commit

Permalink
feat: add checkbox and beginpopup imgui
Browse files Browse the repository at this point in the history
  • Loading branch information
kalilistic committed Sep 23, 2023
1 parent d64c31b commit d5fa8f2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dalamud.Loc/ImGui/LocGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,35 @@ public static bool CollapsingHeader(string key, ImGuiTreeNodeFlags flags = ImGui

return false;
}

/// <summary>
/// Localized Checkbox.
/// </summary>
/// <param name="key">primary key.</param>
/// <param name="value">value to set.</param>
/// <returns>indicator whether checkbox changed.</returns>
public static bool Checkbox(string key, ref bool value)
{
if (ImGuiNET.ImGui.Checkbox(loc.GetString(key), ref value))
{
return true;
}

return false;
}

/// <summary>
/// Localized BeginPopup.
/// </summary>
/// <param name="key">primary key.</param>
/// <returns>indicator whether popup is open.</returns>
public static bool BeginPopup(string key)
{
if (ImGuiNET.ImGui.BeginPopup(loc.GetString(key)))
{
return true;
}

return false;
}
}

0 comments on commit d5fa8f2

Please sign in to comment.