mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix issue with long mod titles in the merge mods tab.
This commit is contained in:
parent
339d1f8caf
commit
9ddb011545
1 changed files with 24 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ using ImGuiNET;
|
|||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Services;
|
||||
using OtterGui.Text;
|
||||
using Penumbra.Mods.Editor;
|
||||
using Penumbra.Mods.Manager;
|
||||
using Penumbra.Mods.SubMods;
|
||||
|
|
@ -46,8 +47,29 @@ public class ModMergeTab(ModMerger modMerger) : IUiService
|
|||
private void DrawMergeInto(float size)
|
||||
{
|
||||
using var bigGroup = ImRaii.Group();
|
||||
var minComboSize = 300 * ImGuiHelpers.GlobalScale;
|
||||
var textSize = ImUtf8.CalcTextSize($"Merge {modMerger.MergeFromMod!.Name} into ").X;
|
||||
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted($"Merge {modMerger.MergeFromMod!.Name} into ");
|
||||
|
||||
using (ImRaii.Group())
|
||||
{
|
||||
ImUtf8.Text("Merge "u8);
|
||||
ImGui.SameLine(0, 0);
|
||||
if (size - textSize < minComboSize)
|
||||
{
|
||||
ImUtf8.Text("selected mod"u8, ColorId.FolderLine.Value());
|
||||
ImUtf8.HoverTooltip(modMerger.MergeFromMod!.Name.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImUtf8.Text(modMerger.MergeFromMod!.Name.Text, ColorId.FolderLine.Value());
|
||||
}
|
||||
|
||||
ImGui.SameLine(0, 0);
|
||||
ImUtf8.Text(" into"u8);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
DrawCombo(size - ImGui.GetItemRectSize().X - ImGui.GetStyle().ItemSpacing.X);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue