mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 12:33:12 +00:00
Fix references to layout header to access certain data
This commit is contained in:
parent
5e4ec3d131
commit
24b33aae15
8 changed files with 15 additions and 9 deletions
|
@ -48,6 +48,7 @@ namespace LayoutBXLYT.Cafe
|
|||
|
||||
public PAN1(BxlytHeader header, string name) : base()
|
||||
{
|
||||
LayoutFile = header;
|
||||
LoadDefaults();
|
||||
Name = name;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace LayoutBXLYT.CTR
|
|||
}
|
||||
|
||||
public PAN1(BxlytHeader header, string name) : base() {
|
||||
LayoutFile = header;
|
||||
LoadDefaults();
|
||||
Name = name;
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ namespace LayoutBXLYT.CTR
|
|||
|
||||
public PAN1(FileReader reader, BxlytHeader header) : base()
|
||||
{
|
||||
LayoutFile = header;
|
||||
_flags1 = reader.ReadByte();
|
||||
byte origin = reader.ReadByte();
|
||||
Alpha = reader.ReadByte();
|
||||
|
|
|
@ -113,8 +113,8 @@ namespace LayoutBXLYT
|
|||
foreach (var tex in tpl.TextureList)
|
||||
{
|
||||
//Only need the first texture
|
||||
if (!textures.ContainsKey(file.FileName))
|
||||
textures.Add(file.FileName, tex);
|
||||
if (!textures.ContainsKey(tpl.FileName))
|
||||
textures.Add(tpl.FileName, tex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ namespace LayoutBXLYT
|
|||
MaterialList = new MAT1(reader, this);
|
||||
break;
|
||||
case "pan1":
|
||||
var panel = new PAN1(reader);
|
||||
var panel = new PAN1(reader, this);
|
||||
AddPaneToTable(panel);
|
||||
if (!setRoot)
|
||||
{
|
||||
|
@ -400,7 +400,7 @@ namespace LayoutBXLYT
|
|||
currentPane = textPanel;
|
||||
break;
|
||||
case "bnd1":
|
||||
var boundsPanel = new BND1(reader);
|
||||
var boundsPanel = new BND1(reader, this);
|
||||
AddPaneToTable(boundsPanel);
|
||||
|
||||
SetPane(boundsPanel, parentPane);
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace LayoutBXLYT.Revolution
|
|||
Name = name;
|
||||
}
|
||||
|
||||
public BND1(FileReader reader) : base(reader)
|
||||
public BND1(FileReader reader, BxlytHeader header) : base(reader, header)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ namespace LayoutBXLYT.Revolution
|
|||
|
||||
public PAN1(BxlytHeader header, string name) : base()
|
||||
{
|
||||
LayoutFile = header;
|
||||
|
||||
LoadDefaults();
|
||||
Name = name;
|
||||
}
|
||||
|
@ -73,8 +75,9 @@ namespace LayoutBXLYT.Revolution
|
|||
Bottom = 2
|
||||
};
|
||||
|
||||
public PAN1(FileReader reader) : base()
|
||||
public PAN1(FileReader reader, BxlytHeader header) : base()
|
||||
{
|
||||
LayoutFile = header;
|
||||
_flags1 = reader.ReadByte();
|
||||
byte origin = reader.ReadByte();
|
||||
Alpha = reader.ReadByte();
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace LayoutBXLYT.Revolution
|
|||
Material = (BxlytMaterial)Material.Clone();
|
||||
}
|
||||
|
||||
public PIC1(FileReader reader, BRLYT.Header header) : base(reader)
|
||||
public PIC1(FileReader reader, BRLYT.Header header) : base(reader, header)
|
||||
{
|
||||
ParentLayout = header;
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace LayoutBXLYT.Revolution
|
|||
ShadowItalic = 0;
|
||||
}
|
||||
|
||||
public TXT1(FileReader reader, BxlytHeader header) : base(reader)
|
||||
public TXT1(FileReader reader, BxlytHeader header) : base(reader, header)
|
||||
{
|
||||
layoutFile = header;
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace LayoutBXLYT.Revolution
|
|||
SetFrames(header);
|
||||
}
|
||||
|
||||
public WND1(BxlytHeader header, FileReader reader) : base(reader)
|
||||
public WND1(BxlytHeader header, FileReader reader) : base(reader, header)
|
||||
{
|
||||
layoutHeader = header;
|
||||
WindowFrames = new List<BxlytWindowFrame>();
|
||||
|
|
Loading…
Reference in a new issue