Add some functionality to allow an IMC group to add apply to all variants.

This commit is contained in:
Ottermandias 2024-06-02 12:08:49 +02:00
parent 137b752196
commit 05d010a281
10 changed files with 117 additions and 46 deletions

View file

@ -19,7 +19,13 @@ public readonly struct ImcModGroupEditDrawer(ModGroupEditDrawer editor, ImcModGr
var entry = group.DefaultEntry;
var changes = false;
ImUtf8.TextFramed(identifier.ToString(), 0, editor.AvailableWidth, borderColor: ImGui.GetColorU32(ImGuiCol.Border));
var width = editor.AvailableWidth.X - ImUtf8.ItemInnerSpacing.X - ImUtf8.CalcTextSize("All Variants"u8).X;
ImUtf8.TextFramed(identifier.ToString(), 0, new Vector2(width, 0), borderColor: ImGui.GetColorU32(ImGuiCol.Border));
ImUtf8.SameLineInner();
var allVariants = group.AllVariants;
if (ImUtf8.Checkbox("All Variants"u8, ref allVariants))
editor.ModManager.OptionEditor.ImcEditor.ChangeAllVariants(group, allVariants);
ImUtf8.HoverTooltip("Make this group overwrite all corresponding variants for this identifier, not just the one specified."u8);
using (ImUtf8.Group())
{