mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Restore Create<AtkTextNode> (#1449)
This commit is contained in:
parent
2cfd96a1fe
commit
eb835548d3
1 changed files with 11 additions and 10 deletions
|
|
@ -417,7 +417,7 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
|
|||
|
||||
private AtkTextNode* MakeNode(uint nodeId)
|
||||
{
|
||||
var newTextNode = AtkUldManager.CreateAtkTextNode();
|
||||
var newTextNode = IMemorySpace.GetUISpace()->Create<AtkTextNode>(); // AtkUldManager.CreateAtkTextNode();
|
||||
if (newTextNode == null)
|
||||
{
|
||||
Log.Debug("Failed to allocate memory for AtkTextNode");
|
||||
|
|
@ -443,15 +443,16 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
|
|||
newTextNode->TextColor = new ByteColor { R = 255, G = 255, B = 255, A = 255 };
|
||||
newTextNode->EdgeColor = new ByteColor { R = 142, G = 106, B = 12, A = 255 };
|
||||
|
||||
// Memory is filled with random data after being created, zero out some things to avoid issues.
|
||||
newTextNode->UnkPtr_1 = null;
|
||||
newTextNode->SelectStart = 0;
|
||||
newTextNode->SelectEnd = 0;
|
||||
newTextNode->FontCacheHandle = 0;
|
||||
newTextNode->CharSpacing = 0;
|
||||
newTextNode->BackgroundColor = new ByteColor { R = 0, G = 0, B = 0, A = 0 };
|
||||
newTextNode->TextId = 0;
|
||||
newTextNode->SheetType = 0;
|
||||
// ICreatable was restored, this may be necessary if AtkUldManager.CreateAtkTextNode(); is used instead of Create<T>
|
||||
// // Memory is filled with random data after being created, zero out some things to avoid issues.
|
||||
// newTextNode->UnkPtr_1 = null;
|
||||
// newTextNode->SelectStart = 0;
|
||||
// newTextNode->SelectEnd = 0;
|
||||
// newTextNode->FontCacheHandle = 0;
|
||||
// newTextNode->CharSpacing = 0;
|
||||
// newTextNode->BackgroundColor = new ByteColor { R = 0, G = 0, B = 0, A = 0 };
|
||||
// newTextNode->TextId = 0;
|
||||
// newTextNode->SheetType = 0;
|
||||
|
||||
return newTextNode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue