Initial commit
This commit is contained in:
22
sidecar/Models/ClassInfo.cs
Normal file
22
sidecar/Models/ClassInfo.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace ArtificersScrollwork.Sidecar.Models;
|
||||
|
||||
public record ClassInfo(
|
||||
string Name,
|
||||
string Namespace,
|
||||
string FilePath,
|
||||
string? BaseClass,
|
||||
List<string> Interfaces,
|
||||
List<PropertyInfo> Properties,
|
||||
List<MethodInfo> Methods,
|
||||
List<string> Attributes,
|
||||
bool IsGump,
|
||||
bool IsMobile,
|
||||
bool IsItem
|
||||
);
|
||||
|
||||
public record PropertyInfo(
|
||||
string Name,
|
||||
string Type,
|
||||
bool HasGetter,
|
||||
bool HasSetter
|
||||
);
|
||||
37
sidecar/Models/DrawCall.cs
Normal file
37
sidecar/Models/DrawCall.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
namespace ArtificersScrollwork.Sidecar.Models;
|
||||
|
||||
/// <summary>Discriminated union of all Gump draw call types.</summary>
|
||||
public abstract record DrawCall(string Type);
|
||||
|
||||
public record BackgroundDrawCall(int X, int Y, int W, int H, int GumpId)
|
||||
: DrawCall("background");
|
||||
|
||||
public record ImageDrawCall(int X, int Y, int GumpId, int? Hue = null)
|
||||
: DrawCall("image");
|
||||
|
||||
public record LabelDrawCall(int X, int Y, int Hue, string Text)
|
||||
: DrawCall("label");
|
||||
|
||||
public record ButtonDrawCall(int X, int Y, int NormalId, int PressedId, int ButtonId)
|
||||
: DrawCall("button");
|
||||
|
||||
public record HtmlDrawCall(int X, int Y, int W, int H, string Text, bool HasBackground, bool HasScrollbar)
|
||||
: DrawCall("html");
|
||||
|
||||
public record ItemDrawCall(int X, int Y, int ItemId, int? Hue = null)
|
||||
: DrawCall("item");
|
||||
|
||||
public record AlphaRegionDrawCall(int X, int Y, int W, int H)
|
||||
: DrawCall("alpha_region");
|
||||
|
||||
public record TiledImageDrawCall(int X, int Y, int W, int H, int GumpId)
|
||||
: DrawCall("tiled_image");
|
||||
|
||||
public record CheckboxDrawCall(int X, int Y, int InactiveId, int ActiveId, bool Checked, int SwitchId)
|
||||
: DrawCall("checkbox");
|
||||
|
||||
public record RadioDrawCall(int X, int Y, int InactiveId, int ActiveId, bool Checked, int ReturnValue)
|
||||
: DrawCall("radio");
|
||||
|
||||
public record TextEntryDrawCall(int X, int Y, int W, int H, int Hue, int EntryId, string InitialText)
|
||||
: DrawCall("text_entry");
|
||||
11
sidecar/Models/FlowNode.cs
Normal file
11
sidecar/Models/FlowNode.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace ArtificersScrollwork.Sidecar.Models;
|
||||
|
||||
public record FlowNode(
|
||||
string Id,
|
||||
string Type, // method_call | condition | gump_send | return | property_access
|
||||
string Label,
|
||||
List<FlowNode> Children,
|
||||
string? FakeInputKey = null,
|
||||
string? ResolvedGump = null,
|
||||
int? AssetRef = null
|
||||
);
|
||||
16
sidecar/Models/MethodInfo.cs
Normal file
16
sidecar/Models/MethodInfo.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace ArtificersScrollwork.Sidecar.Models;
|
||||
|
||||
public record MethodInfo(
|
||||
string Name,
|
||||
string ReturnType,
|
||||
List<ParameterInfo> Parameters,
|
||||
bool IsOverride,
|
||||
bool IsVirtual,
|
||||
bool CallsGump,
|
||||
string? GumpClass
|
||||
);
|
||||
|
||||
public record ParameterInfo(
|
||||
string Name,
|
||||
string Type
|
||||
);
|
||||
17
sidecar/Models/ScriptIndex.cs
Normal file
17
sidecar/Models/ScriptIndex.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace ArtificersScrollwork.Sidecar.Models;
|
||||
|
||||
public record ScriptIndex(
|
||||
int ClassCount,
|
||||
int FileCount,
|
||||
List<ClassSummary> Classes
|
||||
);
|
||||
|
||||
public record ClassSummary(
|
||||
string Name,
|
||||
string Namespace,
|
||||
string FilePath,
|
||||
string? BaseClass,
|
||||
bool IsGump,
|
||||
bool IsMobile,
|
||||
bool IsItem
|
||||
);
|
||||
Reference in New Issue
Block a user