mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Clip meta changes.
This commit is contained in:
parent
4970e57131
commit
6d408ba695
8 changed files with 31 additions and 7 deletions
|
|
@ -66,6 +66,9 @@ public sealed class EqdpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFil
|
||||||
.ThenBy(kvp => kvp.Key.Slot)
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Eqdp.Count;
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EqdpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EqdpIdentifier identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,9 @@ public sealed class EqpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
.ThenBy(kvp => kvp.Key.Slot)
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Eqp.Count;
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EqpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EqpIdentifier identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,9 @@ public sealed class EstMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
.ThenBy(kvp => kvp.Key.Slot)
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Est.Count;
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EstIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EstIdentifier identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,9 @@ public sealed class GlobalEqpMetaDrawer(ModMetaEditor editor, MetaFileManager me
|
||||||
.ThenBy(identifier => identifier.Condition.Id)
|
.ThenBy(identifier => identifier.Condition.Id)
|
||||||
.Select(identifier => (identifier, (byte)0));
|
.Select(identifier => (identifier, (byte)0));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.GlobalEqp.Count;
|
||||||
|
|
||||||
private static void DrawIdentifierInput(ref GlobalEqpManipulation identifier)
|
private static void DrawIdentifierInput(ref GlobalEqpManipulation identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,9 @@ public sealed class GmpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
.OrderBy(kvp => kvp.Key.SetId.Id)
|
.OrderBy(kvp => kvp.Key.SetId.Id)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Gmp.Count;
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref GmpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref GmpIdentifier identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,9 @@ public sealed class ImcMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
.ThenBy(kvp => kvp.Key.Variant.Id)
|
.ThenBy(kvp => kvp.Key.Variant.Id)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Imc.Count;
|
||||||
|
|
||||||
public static bool DrawObjectType(ref ImcIdentifier identifier, float width = 110)
|
public static bool DrawObjectType(ref ImcIdentifier identifier, float width = 110)
|
||||||
{
|
{
|
||||||
var ret = Combos.ImcType("##imcType", identifier.ObjectType, out var type, width);
|
var ret = Combos.ImcType("##imcType", identifier.ObjectType, out var type, width);
|
||||||
|
|
|
||||||
|
|
@ -41,12 +41,14 @@ public abstract class MetaDrawer<TIdentifier, TEntry>(ModMetaEditor editor, Meta
|
||||||
|
|
||||||
using var id = ImUtf8.PushId((int)Identifier.Type);
|
using var id = ImUtf8.PushId((int)Identifier.Type);
|
||||||
DrawNew();
|
DrawNew();
|
||||||
foreach (var ((identifier, entry), idx) in Enumerate().WithIndex())
|
|
||||||
{
|
var height = ImUtf8.FrameHeightSpacing;
|
||||||
id.Push(idx);
|
var skips = ImGuiClip.GetNecessarySkipsAtPos(height, ImGui.GetCursorPosY());
|
||||||
DrawEntry(identifier, entry);
|
var remainder = ImGuiClip.ClippedTableDraw(Enumerate(), skips, DrawLine, Count);
|
||||||
id.Pop();
|
ImGuiClip.DrawEndDummy(remainder, height);
|
||||||
}
|
|
||||||
|
void DrawLine((TIdentifier Identifier, TEntry Value) pair)
|
||||||
|
=> DrawEntry(pair.Identifier, pair.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract ReadOnlySpan<byte> Label { get; }
|
public abstract ReadOnlySpan<byte> Label { get; }
|
||||||
|
|
@ -57,6 +59,7 @@ public abstract class MetaDrawer<TIdentifier, TEntry>(ModMetaEditor editor, Meta
|
||||||
protected abstract void DrawEntry(TIdentifier identifier, TEntry entry);
|
protected abstract void DrawEntry(TIdentifier identifier, TEntry entry);
|
||||||
|
|
||||||
protected abstract IEnumerable<(TIdentifier, TEntry)> Enumerate();
|
protected abstract IEnumerable<(TIdentifier, TEntry)> Enumerate();
|
||||||
|
protected abstract int Count { get; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,9 @@ public sealed class RspMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
.ThenBy(kvp => kvp.Key.Attribute)
|
.ThenBy(kvp => kvp.Key.Attribute)
|
||||||
.Select(kvp => (kvp.Key, kvp.Value));
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
|
protected override int Count
|
||||||
|
=> Editor.Rsp.Count;
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref RspIdentifier identifier)
|
private static bool DrawIdentifierInput(ref RspIdentifier identifier)
|
||||||
{
|
{
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue