some ui updates

This commit is contained in:
2025-09-30 11:17:55 +09:00
parent 9696ac60f1
commit e85b900754
4 changed files with 158 additions and 86 deletions

View File

@@ -512,6 +512,21 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
ImGui.Dummy(new Vector2(0, thickness * scale));
}
public static bool CheckboxWithBorder(string label, ref bool value, Vector4? borderColor = null, float borderThickness = 1.0f, float rounding = 3.0f)
{
var pos = ImGui.GetCursorScreenPos();
bool changed = ImGui.Checkbox(label, ref value);
var min = pos;
var max = ImGui.GetItemRectMax();
var col = ImGui.GetColorU32(borderColor ?? ImGuiColors.DalamudGrey);
ImGui.GetWindowDrawList().AddRect(min, max, col, rounding, ImDrawFlags.None, borderThickness);
return changed;
}
public void MediumText(string text, Vector4? color = null)
{
FontText(text, MediumFont, color);