Initial commit: AetherBags + KamiToolKit for FC Gitea
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 14:46:31 -05:00
commit 8db4ce6094
375 changed files with 34124 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using FFXIVClientStructs.FFXIV.Component.GUI;
using KamiToolKit.Classes;
namespace KamiToolKit.Timelines;
public unsafe class TimelineLabelSet : IDisposable {
private List<TimelineKeyFrame> internalKeyFrames = [];
internal AtkTimelineLabelSet* InternalLabelSet;
public TimelineLabelSet() {
InternalLabelSet = NativeMemoryHelper.UiAlloc<AtkTimelineLabelSet>();
InternalLabelSet->StartFrameIdx = 0;
InternalLabelSet->EndFrameIdx = 0;
InternalLabelSet->LabelKeyGroup.Type = AtkTimelineKeyGroupType.Label;
}
public int StartFrameId {
get => InternalLabelSet->StartFrameIdx;
set => InternalLabelSet->StartFrameIdx = (ushort)value;
}
public int EndFrameId {
get => InternalLabelSet->EndFrameIdx;
set => InternalLabelSet->EndFrameIdx = (ushort)value;
}
public List<TimelineKeyFrame> Labels {
get => internalKeyFrames;
set {
internalKeyFrames = value;
Resync();
}
}
public void Dispose() {
NativeMemoryHelper.UiFree(InternalLabelSet);
InternalLabelSet = null;
}
private void Resync() {
ref var keyGroup = ref InternalLabelSet->LabelKeyGroup;
// Free existing array, we will completely rebuild it
if (keyGroup.KeyFrames is null) {
NativeMemoryHelper.UiFree(keyGroup.KeyFrames, keyGroup.KeyFrameCount);
keyGroup.KeyFrames = null;
}
// Allocate new array
keyGroup.KeyFrames = NativeMemoryHelper.UiAlloc<AtkTimelineKeyFrame>(internalKeyFrames.Count);
var index = 0;
foreach (var keyFrame in internalKeyFrames) {
keyGroup.KeyFrames[index] = keyFrame;
index++;
}
keyGroup.KeyFrameCount = (ushort)internalKeyFrames.Count;
}
}