-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
VFXEditor/Formats/UldFormat/Component/Node/Data/ClippingMaskNodeData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.IO; | ||
using VfxEditor.Parsing.Int; | ||
using VfxEditor.UldFormat.PartList; | ||
|
||
namespace VfxEditor.UldFormat.Component.Node.Data { | ||
public class ClippingMaskNodeData : UldGenericData { | ||
private readonly ParsedIntSelect<UldPartList> PartListId; | ||
private readonly ParsedUIntPicker<UldPartItem> PartId; | ||
|
||
public ClippingMaskNodeData() { | ||
PartListId = new( "Part List", 0, | ||
() => Plugin.UldManager.File.PartsSplitView, | ||
( UldPartList item ) => ( int )item.Id.Value, | ||
( UldPartList item, int _ ) => item.GetText() | ||
); | ||
PartId = new( "Part", | ||
() => PartListId.Selected?.Parts, | ||
( UldPartItem item, int idx ) => item.GetText( idx ), | ||
null | ||
); | ||
} | ||
|
||
public override void Read( BinaryReader reader ) { | ||
PartListId.Read( reader ); | ||
PartId.Read( reader ); | ||
} | ||
|
||
public override void Write( BinaryWriter writer ) { | ||
PartListId.Write( writer ); | ||
PartId.Write( writer ); | ||
} | ||
|
||
public override void Draw() { | ||
PartListId.Draw(); | ||
PartId.Draw(); | ||
PartId.Selected?.DrawImage( false ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters