From ccbb566a88b5ff01363ca7cec129f2e9b9c5474a Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Thu, 5 Sep 2019 16:24:03 -0400 Subject: [PATCH] Bflyt editor improvements --- .../FileFormats/Layout/CAFE/BFLYT.cs | 167 ++++++++- .../FileFormats/Layout/CAFE/FLYT.cs | 7 + .../FileFormats/Layout/Common.cs | 16 +- .../FileFormats/Layout/LayoutTextureLoader.cs | 29 ++ .../FileFormats/Texture/WTB.cs | 2 +- .../File_Format_Library.csproj | 14 + File_Format_Library/GUI/BFLYT/LayoutEditor.cs | 13 +- .../GUI/BFLYT/LayoutHierarchy.Designer.cs | 9 +- .../GUI/BFLYT/LayoutHierarchy.cs | 119 ++++++- .../GUI/BFLYT/LayoutPartsEditor.Designer.cs | 86 +++++ .../GUI/BFLYT/LayoutPartsEditor.cs | 28 ++ .../GUI/BFLYT/LayoutPartsEditor.resx | 120 +++++++ .../GUI/BFLYT/LayoutProperties.cs | 3 + File_Format_Library/GUI/BFLYT/LayoutViewer.cs | 84 ++++- File_Format_Library/GUI/BFLYT/Textbox.cs | 114 ++++++ .../Dialogs/ColorSelectorDropdown.Designer.cs | 109 ++++++ .../Forms/Dialogs/ColorSelectorDropdown.cs | 52 +++ .../Forms/Dialogs/ColorSelectorDropdown.resx | 328 ++++++++++++++++++ .../Forms/Editors/TextEditor/TextEditor.cs | 10 + Switch_Toolbox_Library/Helpers/TreeHelper.cs | 4 +- .../IO/Colors/ColorEditor.cs | 2 +- .../Interfaces/FileFormatting/IArchiveFile.cs | 4 +- .../Properties/Resources.Designer.cs | 10 + .../Properties/Resources.resx | 3 + Switch_Toolbox_Library/Resources/Font.png | Bin 0 -> 3065 bytes Switch_Toolbox_Library/Toolbox_Library.csproj | 13 + 26 files changed, 1315 insertions(+), 31 deletions(-) create mode 100644 File_Format_Library/FileFormats/Layout/LayoutTextureLoader.cs create mode 100644 File_Format_Library/GUI/BFLYT/LayoutPartsEditor.Designer.cs create mode 100644 File_Format_Library/GUI/BFLYT/LayoutPartsEditor.cs create mode 100644 File_Format_Library/GUI/BFLYT/LayoutPartsEditor.resx create mode 100644 File_Format_Library/GUI/BFLYT/Textbox.cs create mode 100644 Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.Designer.cs create mode 100644 Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.cs create mode 100644 Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.resx create mode 100644 Switch_Toolbox_Library/Resources/Font.png diff --git a/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs b/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs index 2b038d3f..d37bc1ba 100644 --- a/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs +++ b/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; +using System.Linq; using Toolbox; using System.Windows.Forms; using Toolbox.Library; @@ -202,13 +202,15 @@ namespace LayoutBXLYT.Cafe BNTX bntx = (BNTX)file.OpenFile(); file.FileFormat = bntx; foreach (var tex in bntx.Textures) - textures.Add(tex.Key, tex.Value); + if (!textures.ContainsKey(tex.Key)) + textures.Add(tex.Key, tex.Value); } else if (Utils.GetExtension(file.FileName) == ".bflim") { BFLIM bflim = (BFLIM)file.OpenFile(); file.FileFormat = bflim; - textures.Add(bflim.FileName, bflim); + if (!textures.ContainsKey(bflim.FileName)) + textures.Add(bflim.FileName, bflim); } } } @@ -233,6 +235,9 @@ namespace LayoutBXLYT.Cafe private ushort ByteOrderMark; private ushort HeaderSize; + [Browsable(false)] + public Dictionary PaneLookup = new Dictionary(); + [Browsable(false)] public LYT1 LayoutInfo { get; set; } [Browsable(false)] @@ -261,6 +266,12 @@ namespace LayoutBXLYT.Cafe get { return TextureList.Textures; } } + [Browsable(false)] + public override List Fonts + { + get { return FontList.Fonts; } + } + [Browsable(false)] public override Dictionary GetTextures { @@ -283,6 +294,17 @@ namespace LayoutBXLYT.Cafe return panes; } + public override List GetMaterials() + { + List materials = new List(); + if (MaterialList != null && MaterialList.Materials != null) + { + for (int i = 0; i < MaterialList.Materials.Count; i++) + materials.Add(MaterialList.Materials[i]); + } + return materials; + } + private void GetPaneChildren(List panes, PAN1 root) { panes.Add(root); @@ -369,6 +391,7 @@ namespace LayoutBXLYT.Cafe break; case "pan1": var panel = new PAN1(reader); + AddPaneToTable(panel); if (!setRoot) { RootPane = panel; @@ -380,30 +403,36 @@ namespace LayoutBXLYT.Cafe break; case "pic1": var picturePanel = new PIC1(reader, this); + AddPaneToTable(picturePanel); SetPane(picturePanel, parentPane); currentPane = picturePanel; break; case "txt1": var textPanel = new TXT1(reader, this); + AddPaneToTable(textPanel); SetPane(textPanel, parentPane); currentPane = textPanel; break; case "bnd1": var boundsPanel = new BND1(reader, this); + AddPaneToTable(boundsPanel); SetPane(boundsPanel, parentPane); currentPane = boundsPanel; break; case "prt1": var partsPanel = new PRT1(reader, this); + AddPaneToTable(partsPanel); SetPane(partsPanel, parentPane); currentPane = partsPanel; break; case "wnd1": var windowPanel = new WND1(reader, this); + AddPaneToTable(windowPanel); + SetPane(windowPanel, parentPane); currentPane = windowPanel; break; @@ -439,7 +468,8 @@ namespace LayoutBXLYT.Cafe Container = new CNT1(reader, this); break;*/ case "usd1": - ((PAN1)currentPane).UserData = new USD1(reader, this); + if (currentPane != null) + ((PAN1)currentPane).UserData = new USD1(reader, this); break; //If the section is not supported store the raw bytes default: @@ -453,6 +483,12 @@ namespace LayoutBXLYT.Cafe } } + private void AddPaneToTable(BasePane pane) + { + if (!PaneLookup.ContainsKey(pane.Name)) + PaneLookup.Add(pane.Name, pane); + } + private void SetPane(BasePane pane, BasePane parentPane) { if (parentPane != null) @@ -1013,10 +1049,36 @@ namespace LayoutBXLYT.Cafe public class GRP1 : BasePane { + private Header LayoutFile; + public override string Signature { get; } = "grp1"; public List Panes { get; set; } = new List(); + private bool displayInEditor = true; + public override bool DisplayInEditor + { + get { return displayInEditor; } + set + { + displayInEditor = value; + for (int i = 0; i < Panes.Count; i++) + { + var pane = SearchPane(Panes[i]); + Console.WriteLine($"searching {Panes[i]} {pane != null}"); + if (pane != null) + pane.DisplayInEditor = value; + } + } + } + + private BasePane SearchPane(string name) + { + if (LayoutFile.PaneLookup.ContainsKey(name)) + return LayoutFile.PaneLookup[name]; + return null; + } + public GRP1() : base() { @@ -1024,6 +1086,8 @@ namespace LayoutBXLYT.Cafe public GRP1(FileReader reader, Header header) { + LayoutFile = header; + ushort numNodes = 0; if (header.VersionMajor >= 5) { @@ -1038,7 +1102,7 @@ namespace LayoutBXLYT.Cafe } for (int i = 0; i < numNodes; i++) - Panes.Add(reader.ReadString(24)); + Panes.Add(reader.ReadString(24).Replace("\0", string.Empty)); } public override void Write(FileWriter writer, BxlytHeader header) @@ -1081,10 +1145,95 @@ namespace LayoutBXLYT.Cafe [DisplayName("External Layout File"), CategoryAttribute("Parts")] public string LayoutFile { get; set; } + private BFLYT ExternalLayout; + + public BasePane GetExternalPane() + { + if (ExternalLayout == null) + ExternalLayout = SearchExternalFile(); + + if (ExternalLayout == null) + return null; + + return ExternalLayout.header.RootPane; + } + + //Get textures if possible from the external parts file + public void UpdateTextureData(Dictionary textures) + { + if (ExternalLayout == null) + { + ExternalLayout = SearchExternalFile(); + if (ExternalLayout == null) + return; + + var textureList = ExternalLayout.GetTextures(); + foreach (var tex in textureList) + if (!textures.ContainsKey(tex.Key)) + textures.Add(tex.Key, tex.Value); + + textureList.Clear(); + } + } + + private BFLYT SearchExternalFile() + { + var fileFormat = layoutFile.FileInfo; + + //File is outside an archive so check the contents it is in + if (File.Exists(fileFormat.FileName)) + { + string folder = Path.GetDirectoryName(fileFormat.FileName); + foreach (var file in Directory.GetFiles(folder)) + { + if (file.Contains(LayoutFile)) + { + var bflyt = STFileLoader.OpenFileFormat(file) as BFLYT; + if (bflyt == null) + continue; + + bflyt.IFileInfo = new IFileInfo(); + bflyt.IFileInfo.ArchiveParent = fileFormat.IFileInfo.ArchiveParent; + return bflyt; + } + } + } + else if (fileFormat.IFileInfo.ArchiveParent != null) + { + BFLYT bflyt = null; + SearchArchive(fileFormat.IFileInfo.ArchiveParent, ref bflyt); + return bflyt; + } + + return null; + } + + private void SearchArchive(IArchiveFile archiveFile, ref BFLYT layoutFile) + { + layoutFile = null; + + foreach (var file in archiveFile.Files) + if (file.FileName.Contains(LayoutFile)) + { + var openedFile = file.OpenFile(); + if (openedFile is IArchiveFile) + SearchArchive((IArchiveFile)openedFile, ref layoutFile); + else if (openedFile is BFLYT) + { + layoutFile = openedFile as BFLYT; + layoutFile.IFileInfo = new IFileInfo(); + layoutFile.IFileInfo.ArchiveParent = layoutFile.IFileInfo.ArchiveParent; + return; + } + } + } + + private Header layoutFile; public PRT1(FileReader reader, Header header) : base(reader) { - Properties = new List(); + layoutFile = header; + Properties = new List(); StartPosition = reader.Position - 84; uint properyCount = reader.ReadUInt32(); @@ -1617,10 +1766,10 @@ namespace LayoutBXLYT.Cafe //Thanks to shibbs for the material info //https://github.com/shibbo/flyte/blob/master/flyte/lyt/common/MAT1.cs - public class Material + public class Material : BxlytMaterial { [DisplayName("Name"), CategoryAttribute("General")] - public string Name { get; set; } + public override string Name { get; set; } [DisplayName("Black Color"), CategoryAttribute("Color")] public STColor8 BlackColor { get; set; } diff --git a/File_Format_Library/FileFormats/Layout/CAFE/FLYT.cs b/File_Format_Library/FileFormats/Layout/CAFE/FLYT.cs index 6a7c5b66..730f887c 100644 --- a/File_Format_Library/FileFormats/Layout/CAFE/FLYT.cs +++ b/File_Format_Library/FileFormats/Layout/CAFE/FLYT.cs @@ -11,6 +11,13 @@ namespace LayoutBXLYT { public class FLYT { + public static BFLYT.Header FromXml(string text) + { + BFLYT.Header header = new BFLYT.Header(); + header.RootGroup = new BFLYT.GRP1(); + return header; + } + public static string ToXml(BFLYT.Header header) { return ""; diff --git a/File_Format_Library/FileFormats/Layout/Common.cs b/File_Format_Library/FileFormats/Layout/Common.cs index b0a39d59..41bf5f68 100644 --- a/File_Format_Library/FileFormats/Layout/Common.cs +++ b/File_Format_Library/FileFormats/Layout/Common.cs @@ -20,7 +20,7 @@ namespace LayoutBXLYT public virtual bool InfluenceAlpha { get; set; } [Browsable(false)] - public bool DisplayInEditor { get; set; } = true; + public virtual bool DisplayInEditor { get; set; } = true; [DisplayName("Name"), CategoryAttribute("Pane")] public string Name { get; set; } @@ -259,6 +259,9 @@ namespace LayoutBXLYT [Browsable(false)] public virtual List Textures { get; } + [Browsable(false)] + public virtual List Fonts { get; } + [Browsable(false)] internal uint Version; @@ -271,6 +274,11 @@ namespace LayoutBXLYT } } + [Browsable(false)] + public virtual List GetMaterials() + { + return new List(); + } [RefreshProperties(RefreshProperties.All)] public uint VersionMajor { get; set; } @@ -300,6 +308,12 @@ namespace LayoutBXLYT } } + public class BxlytMaterial + { + [DisplayName("Name"), CategoryAttribute("General")] + public virtual string Name { get; set; } + } + public class SectionCommon { public virtual string Signature { get; } diff --git a/File_Format_Library/FileFormats/Layout/LayoutTextureLoader.cs b/File_Format_Library/FileFormats/Layout/LayoutTextureLoader.cs new file mode 100644 index 00000000..685e7eba --- /dev/null +++ b/File_Format_Library/FileFormats/Layout/LayoutTextureLoader.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FirstPlugin; +using Toolbox.Library; + +namespace LayoutBXLYT +{ + public class LayoutTextureLoader + { + public static List SwitchTextures = new List(); + public static Dictionary Textures = new Dictionary(); + public static List SearchFolderPaths = new List(); + + /* public static Dictionary GetTextures(List textureList, IArchiveFile archive = null) + { + var textures = new Dictionary(); + if (archive != null) + { + foreach (var file in archive.Files) + { + + } + } + }*/ + } +} diff --git a/File_Format_Library/FileFormats/Texture/WTB.cs b/File_Format_Library/FileFormats/Texture/WTB.cs index 830da375..faca466a 100644 --- a/File_Format_Library/FileFormats/Texture/WTB.cs +++ b/File_Format_Library/FileFormats/Texture/WTB.cs @@ -199,7 +199,7 @@ namespace FirstPlugin {0x35, TEX_FORMAT.ASTC_10x5_UNORM}, {0x36, TEX_FORMAT.ASTC_10x6_UNORM}, {0x37, TEX_FORMAT.ASTC_10x8_UNORM}, - {0x38, TEX_FORMAT.ASTC_10x10_UNORM}, + {0x38, TEX_FORMAT.ASTC_8x8_UNORM}, {0x39, TEX_FORMAT.ASTC_12x10_UNORM}, {0x3a, TEX_FORMAT.ASTC_12x12_UNORM}, {0x3b, TEX_FORMAT.B5G5R5A1_UNORM}, diff --git a/File_Format_Library/File_Format_Library.csproj b/File_Format_Library/File_Format_Library.csproj index 2c09bc48..6d135417 100644 --- a/File_Format_Library/File_Format_Library.csproj +++ b/File_Format_Library/File_Format_Library.csproj @@ -304,6 +304,7 @@ + @@ -341,6 +342,12 @@ LayoutHierarchy.cs + + Form + + + LayoutPartsEditor.cs + Form @@ -365,6 +372,7 @@ LayoutViewer.cs + UserControl @@ -1146,9 +1154,15 @@ LayoutHierarchy.cs + + LayoutPartsEditor.cs + LayoutProperties.cs + + LayoutTextDocked.cs + LayoutTextureList.cs diff --git a/File_Format_Library/GUI/BFLYT/LayoutEditor.cs b/File_Format_Library/GUI/BFLYT/LayoutEditor.cs index 8bc6d704..2cad24c8 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutEditor.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutEditor.cs @@ -63,6 +63,7 @@ namespace LayoutBXLYT private LayoutTextureList LayoutTextureList; private LayoutProperties LayoutProperties; private LayoutTextDocked TextConverter; + private LayoutPartsEditor LayoutPartsEditor; private bool isLoaded = false; public void LoadBxlyt(BxlytHeader header, string fileName) @@ -86,6 +87,7 @@ namespace LayoutBXLYT private void InitializeDockPanels() { ShowTextureList(); + ShowPartsEditor(); ShowPaneHierarchy(); ShowPropertiesPanel(); UpdateBackColor(); @@ -141,10 +143,10 @@ namespace LayoutBXLYT { if (isChecked) return; - ActiveViewport.SelectedPanes.Clear(); - if (LayoutProperties != null && (string)sender == "Select") { + ActiveViewport.SelectedPanes.Clear(); + if (e is TreeViewEventArgs) { var node = ((TreeViewEventArgs)e).Node; @@ -200,6 +202,13 @@ namespace LayoutBXLYT ShowTextureList(); } + private void ShowPartsEditor() + { + LayoutPartsEditor = new LayoutPartsEditor(); + LayoutPartsEditor.Text = "Parts Editor"; + LayoutPartsEditor.Show(dockPanel1, DockState.DockLeft); + } + private void ShowPropertiesPanel() { LayoutProperties = new LayoutProperties(); diff --git a/File_Format_Library/GUI/BFLYT/LayoutHierarchy.Designer.cs b/File_Format_Library/GUI/BFLYT/LayoutHierarchy.Designer.cs index 13412f94..8c665fc1 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutHierarchy.Designer.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutHierarchy.Designer.cs @@ -33,22 +33,25 @@ // // treeView1 // - this.treeView1.CheckBoxes = true; + this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; this.treeView1.Location = new System.Drawing.Point(0, 0); this.treeView1.Name = "treeView1"; - this.treeView1.Size = new System.Drawing.Size(317, 372); + this.treeView1.Size = new System.Drawing.Size(301, 333); this.treeView1.TabIndex = 0; this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick); + this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown); + this.treeView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseClick); // // LayoutHierarchy // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(301, 333); this.Controls.Add(this.treeView1); this.Name = "LayoutHierarchy"; - this.Size = new System.Drawing.Size(317, 372); this.ResumeLayout(false); } diff --git a/File_Format_Library/GUI/BFLYT/LayoutHierarchy.cs b/File_Format_Library/GUI/BFLYT/LayoutHierarchy.cs index 9b02485a..7b6268fd 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutHierarchy.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutHierarchy.cs @@ -15,6 +15,8 @@ namespace LayoutBXLYT { public partial class LayoutHierarchy : LayoutDocked { + private STContextMenuStrip ContexMenu; + public LayoutHierarchy() { InitializeComponent(); @@ -23,6 +25,7 @@ namespace LayoutBXLYT treeView1.ForeColor = FormThemes.BaseTheme.FormForeColor; var imgList = new ImageList(); + imgList.ColorDepth = ColorDepth.Depth32Bit; imgList.Images.Add("folder", Toolbox.Library.Properties.Resources.Folder); imgList.Images.Add("AlignmentPane", FirstPlugin.Properties.Resources.AlignmentPane); imgList.Images.Add("WindowPane", FirstPlugin.Properties.Resources.WindowPane); @@ -32,9 +35,17 @@ namespace LayoutBXLYT imgList.Images.Add("PicturePane", FirstPlugin.Properties.Resources.PicturePane); imgList.Images.Add("QuickAcess", FirstPlugin.Properties.Resources.QuickAccess); imgList.Images.Add("TextPane", FirstPlugin.Properties.Resources.TextPane); + imgList.Images.Add("material", Toolbox.Library.Properties.Resources.materialSphere); + imgList.Images.Add("texture", Toolbox.Library.Properties.Resources.Texture); + imgList.Images.Add("font", Toolbox.Library.Properties.Resources.Font); imgList.ImageSize = new Size(22,22); treeView1.ImageList = imgList; + + BackColor = FormThemes.BaseTheme.FormBackColor; + ForeColor = FormThemes.BaseTheme.FormForeColor; + + ContexMenu = new STContextMenuStrip(); } private bool isLoaded = false; @@ -47,9 +58,11 @@ namespace LayoutBXLYT treeView1.BeginUpdate(); treeView1.Nodes.Clear(); - treeView1.Nodes.Add(new TreeNode("File Settings") {Tag = bxlyt }); - CreateQuickAccess(bxlyt); + treeView1.Nodes.Add(new TreeNode("File Settings") {Tag = bxlyt }); + LoadTextures(bxlyt.Textures); + LoadFonts(bxlyt.Fonts); + LoadMaterials(bxlyt.GetMaterials()); LoadPane(bxlyt.RootGroup); LoadPane(bxlyt.RootPane); @@ -64,6 +77,46 @@ namespace LayoutBXLYT isLoaded = false; } + private void LoadTextures(List textures) + { + TreeNode node = new TreeNode("Textures"); + treeView1.Nodes.Add(node); + for (int i = 0; i < textures.Count; i++) + { + TreeNode matNode = new TreeNode(textures[i]); + matNode.ImageKey = "texture"; + matNode.SelectedImageKey = "texture"; + node.Nodes.Add(matNode); + } + } + + private void LoadFonts(List fonts) + { + TreeNode node = new TreeNode("Fonts"); + treeView1.Nodes.Add(node); + for (int i = 0; i < fonts.Count; i++) + { + TreeNode matNode = new TreeNode(fonts[i]); + matNode.ImageKey = "font"; + matNode.SelectedImageKey = "font"; + node.Nodes.Add(matNode); + } + } + + private void LoadMaterials(List materials) + { + TreeNode node = new TreeNode("Materials"); + treeView1.Nodes.Add(node); + for (int i = 0; i < materials.Count; i++) + { + TreeNode matNode = new TreeNode(materials[i].Name); + matNode.Tag = materials[i]; + matNode.ImageKey = "material"; + matNode.SelectedImageKey = "material"; + node.Nodes.Add(matNode); + } + } + private void CreateQuickAccess(BxlytHeader bxlyt) { var panes = new List(); @@ -137,9 +190,9 @@ namespace LayoutBXLYT private PaneTreeWrapper CreatePaneWrapper(BasePane pane) { PaneTreeWrapper paneNode = new PaneTreeWrapper(); - paneNode.Checked = true; paneNode.Text = pane.Name; paneNode.Tag = pane; + paneNode.Checked = true; string imageKey = ""; if (pane is BFLYT.WND1) imageKey = "WindowPane"; @@ -183,7 +236,67 @@ namespace LayoutBXLYT private void treeView1_AfterCheck(object sender, TreeViewEventArgs e) { if (isLoaded) + { + if (!e.Node.Checked) + e.Node.ForeColor = FormThemes.BaseTheme.DisabledItemColor; + else + e.Node.ForeColor = treeView1.ForeColor; + OnProperySelected.Invoke("Checked", e); + } + } + + private void treeView1_MouseClick(object sender, MouseEventArgs e) + { + + } + + private void TogglePane(object sender, EventArgs e) + { + TogglePane(treeView1.SelectedNode); + } + + private void TogglePane(TreeNode node) + { + if (node == null) + return; + + if (node.Checked) + node.Checked = false; + else + node.Checked = true; + } + + private void treeView1_KeyDown(object sender, KeyEventArgs e) + { + var node = treeView1.SelectedNode; + if (node == null || node.Tag == null) + return; + + if (e.KeyCode == Keys.H && e.Control) + { + if (node.Tag is BasePane) + TogglePane(node); + } + } + + private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) + { + if (e.Node.Tag == null) + return; + + if (e.Button == MouseButtons.Right) + { + treeView1.SelectedNode = e.Node; + + if (e.Node.Tag is BasePane) + { + ContexMenu.Items.Clear(); + ContexMenu.Items.Add(new STToolStipMenuItem("Display Panes", null, TogglePane, Keys.Control | Keys.H)); + // ContexMenu.Items.Add(new STToolStipMenuItem("Display Children Panes", null, TogglePane, Keys.Control | Keys.H)); + ContexMenu.Show(Cursor.Position); + } + } } } } diff --git a/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.Designer.cs b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.Designer.cs new file mode 100644 index 00000000..ed725819 --- /dev/null +++ b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.Designer.cs @@ -0,0 +1,86 @@ +namespace LayoutBXLYT +{ + partial class LayoutPartsEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.stLabel1 = new Toolbox.Library.Forms.STLabel(); + this.stButton1 = new Toolbox.Library.Forms.STButton(); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listView1.Location = new System.Drawing.Point(12, 25); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(357, 104); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + // + // stLabel1 + // + this.stLabel1.AutoSize = true; + this.stLabel1.Location = new System.Drawing.Point(12, 9); + this.stLabel1.Name = "stLabel1"; + this.stLabel1.Size = new System.Drawing.Size(74, 13); + this.stLabel1.TabIndex = 1; + this.stLabel1.Text = "Search Paths:"; + // + // stButton1 + // + this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.stButton1.Location = new System.Drawing.Point(15, 135); + this.stButton1.Name = "stButton1"; + this.stButton1.Size = new System.Drawing.Size(75, 23); + this.stButton1.TabIndex = 2; + this.stButton1.Text = "Add"; + this.stButton1.UseVisualStyleBackColor = false; + // + // LayoutPartsEditor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(381, 431); + this.Controls.Add(this.stButton1); + this.Controls.Add(this.stLabel1); + this.Controls.Add(this.listView1); + this.Name = "LayoutPartsEditor"; + this.Text = "Parts Editor"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private Toolbox.Library.Forms.STLabel stLabel1; + private Toolbox.Library.Forms.STButton stButton1; + } +} \ No newline at end of file diff --git a/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.cs b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.cs new file mode 100644 index 00000000..d78cf4e6 --- /dev/null +++ b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Toolbox.Library; +using Toolbox.Library.Forms; + +namespace LayoutBXLYT +{ + public partial class LayoutPartsEditor : LayoutDocked + { + public LayoutPartsEditor() + { + InitializeComponent(); + + listView1.BackColor = FormThemes.BaseTheme.FormBackColor; + listView1.ForeColor = FormThemes.BaseTheme.FormForeColor; + + BackColor = FormThemes.BaseTheme.FormBackColor; + ForeColor = FormThemes.BaseTheme.FormForeColor; + } + } +} diff --git a/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.resx b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/File_Format_Library/GUI/BFLYT/LayoutPartsEditor.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/File_Format_Library/GUI/BFLYT/LayoutProperties.cs b/File_Format_Library/GUI/BFLYT/LayoutProperties.cs index 1c8efc3b..051f3a63 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutProperties.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutProperties.cs @@ -23,6 +23,9 @@ namespace LayoutBXLYT userDataEditor = new UserDataEditor(); userDataEditor.Dock = DockStyle.Fill; tabPage2.Controls.Add(userDataEditor); + + BackColor = FormThemes.BaseTheme.FormBackColor; + ForeColor = FormThemes.BaseTheme.FormForeColor; } public void Reset() diff --git a/File_Format_Library/GUI/BFLYT/LayoutViewer.cs b/File_Format_Library/GUI/BFLYT/LayoutViewer.cs index f1a085c3..1b317a3c 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutViewer.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutViewer.cs @@ -95,7 +95,7 @@ namespace LayoutBXLYT GL.Viewport(0, 0, glControl1.Width, glControl1.Height); GL.MatrixMode(MatrixMode.Projection); GL.LoadIdentity(); - GL.Ortho(0, glControl1.Width, glControl1.Height, 0, -1, 1); + GL.Ortho(0, glControl1.Width, glControl1.Height, 0, -1, 100); GL.MatrixMode(MatrixMode.Modelview); GL.LoadIdentity(); @@ -123,17 +123,31 @@ namespace LayoutBXLYT glControl1.SwapBuffers(); } - private void RenderPanes(BasePane pane, bool isRoot, byte parentAlpha) + private void RenderPanes(BasePane pane, bool isRoot, byte parentAlpha, BasePane partPane = null) { if (!pane.DisplayInEditor) return; GL.PushMatrix(); - GL.Translate(pane.Translate.X, pane.Translate.Y, 0); - GL.Rotate(pane.Rotate.Z, pane.Rotate.X, pane.Rotate.Y, pane.Rotate.Z); - GL.Scale(pane.Scale.X, pane.Scale.Y, 1); - byte effectiveAlpha = (byte)(parentAlpha == 255 ? pane.Alpha : pane.Alpha / 255); + if (partPane != null) + { + var translate = partPane.Translate + pane.Translate; + var scale = partPane.Scale * pane.Scale; + var rotate = partPane.Rotate + pane.Rotate; + + GL.Translate(translate.X + translate.X, translate.Y, 0); + GL.Rotate(rotate.Z, rotate.X, rotate.Y, rotate.Z); + GL.Scale(scale.X, scale.Y, 1); + } + else + { + GL.Translate(pane.Translate.X, pane.Translate.Y, 0); + GL.Rotate(pane.Rotate.Z, pane.Rotate.X, pane.Rotate.Y, pane.Rotate.Z); + GL.Scale(pane.Scale.X, pane.Scale.Y, 1); + } + + byte effectiveAlpha = (byte)(parentAlpha == 255 ? pane.Alpha : (pane.Alpha * parentAlpha) / 255); if (!isRoot) { @@ -143,19 +157,24 @@ namespace LayoutBXLYT DrawPicturePane((BCLYT.PIC1)pane, effectiveAlpha); else if (pane is BRLYT.PIC1) DrawPicturePane((BRLYT.PIC1)pane, effectiveAlpha); + else if (pane is BFLYT.PRT1) + DrawPartsPane((BFLYT.PRT1)pane, effectiveAlpha); else if (pane is BFLYT.PAN1) DrawDefaultPane((BFLYT.PAN1)pane); else if (pane is BCLYT.PAN1) DrawDefaultPane((BCLYT.PAN1)pane); else if (pane is BRLYT.PAN1) DrawDefaultPane((BRLYT.PAN1)pane); + + // else if (pane is BFLYT.WND1) + // DrawWindowPane((BFLYT.WND1)pane, effectiveAlpha); } else isRoot = false; byte childAlpha = pane.InfluenceAlpha ? effectiveAlpha : byte.MaxValue; foreach (var childPane in pane.Childern) - RenderPanes(childPane, isRoot, childAlpha); + RenderPanes(childPane, isRoot, childAlpha, partPane); GL.PopMatrix(); } @@ -220,6 +239,47 @@ namespace LayoutBXLYT DrawRectangle(pane.CreateRectangle(), TexCoords, Colors); } + private void DrawPartsPane(BFLYT.PRT1 pane, byte effectiveAlpha) + { + pane.UpdateTextureData(this.Textures); + var partPane = pane.GetExternalPane(); + if (partPane != null) + { + RenderPanes(partPane, false, effectiveAlpha); + } + else + DrawDefaultPane(pane); + + if (pane.Properties != null) + { + foreach (var prop in pane.Properties) + { + if (prop.Property != null) + RenderPanes(prop.Property, false, effectiveAlpha); + } + } + } + + private void DrawWindowPane(BFLYT.WND1 pane, byte effectiveAlpha) + { + float frameLeft = 0; + float frameTop = 0; + float frameRight = 0; + float frameBottom = 0; + if (pane.FrameCount == 1) + { + + } + else if (pane.FrameCount == 4) + { + + } + else if (pane.FrameCount == 8) + { + + } + } + private void DrawPicturePane(BCLYT.PIC1 pane, byte effectiveAlpha) { Vector2[] TexCoords = new Vector2[] { @@ -391,6 +451,16 @@ namespace LayoutBXLYT GL.TexCoord2(texCoords[3]); GL.Vertex2(rect.LeftPoint, rect.TopPoint); GL.End(); + + //Draw outline + GL.Begin(PrimitiveType.LineLoop); + GL.LineWidth(3); + GL.Color4(colors[0]); + GL.Vertex2(rect.LeftPoint, rect.BottomPoint); + GL.Vertex2(rect.RightPoint, rect.BottomPoint); + GL.Vertex2(rect.RightPoint, rect.TopPoint); + GL.Vertex2(rect.LeftPoint, rect.TopPoint); + GL.End(); } } diff --git a/File_Format_Library/GUI/BFLYT/Textbox.cs b/File_Format_Library/GUI/BFLYT/Textbox.cs new file mode 100644 index 00000000..372e842c --- /dev/null +++ b/File_Format_Library/GUI/BFLYT/Textbox.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Drawing; +using System.Drawing.Text; +using System.Drawing.Drawing2D; +using OpenTK; +using OpenTK.Graphics.OpenGL; +using OpenTK.Input; +using System.Diagnostics; + +namespace LayoutBXLYT +{ + public class Textbox + { + public int GlyphsPerLine = 16; + public int GlyphLineCount = 16; + public int GlyphWidth = 11; + public int GlyphHeight = 22; + + public int CharXSpacing = 11; + + public int AtlasOffsetX = -3, AtlassOffsetY = -1; + public int FontSize = 14; + public bool BitmapFont = false; + public string FromFile; //= "joystix monospace.ttf"; + public string FontName = "Consolas"; + + public Textbox() + { + GenerateFontImage(); + } + + void GenerateFontImage() + { + int bitmapWidth = GlyphsPerLine * GlyphWidth; + int bitmapHeight = GlyphLineCount * GlyphHeight; + + using (Bitmap bitmap = new Bitmap(bitmapWidth, bitmapHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb)) + { + Font font; + if (!String.IsNullOrWhiteSpace(FromFile)) + { + var collection = new PrivateFontCollection(); + collection.AddFontFile(FromFile); + var fontFamily = new FontFamily(Path.GetFileNameWithoutExtension(FromFile), collection); + font = new Font(fontFamily, FontSize); + } + else + { + font = new Font(new FontFamily(FontName), FontSize); + } + + using (var g = Graphics.FromImage(bitmap)) + { + if (BitmapFont) + { + g.SmoothingMode = SmoothingMode.None; + g.TextRenderingHint = TextRenderingHint.SingleBitPerPixel; + } + else + { + g.SmoothingMode = SmoothingMode.HighQuality; + g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + //g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + } + + for (int p = 0; p < GlyphLineCount; p++) + { + for (int n = 0; n < GlyphsPerLine; n++) + { + char c = (char)(n + p * GlyphsPerLine); + g.DrawString(c.ToString(), font, Brushes.White, + n * GlyphWidth + AtlasOffsetX, p * GlyphHeight + AtlassOffsetY); + } + } + } + // bitmap.Save(FontBitmapFilename); + } + // Process.Start(FontBitmapFilename); + } + + int TextureWidth; + int TextureHeight; + + public void DrawText(int x, int y, string text) + { + GL.Begin(PrimitiveType.Quads); + + float u_step = (float)GlyphWidth / (float)TextureWidth; + float v_step = (float)GlyphHeight / (float)TextureHeight; + + for (int n = 0; n < text.Length; n++) + { + char idx = text[n]; + float u = (float)(idx % GlyphsPerLine) * u_step; + float v = (float)(idx / GlyphsPerLine) * v_step; + + GL.TexCoord2(u, v); + GL.Vertex2(x, y); + GL.TexCoord2(u + u_step, v); + GL.Vertex2(x + GlyphWidth, y); + GL.TexCoord2(u + u_step, v + v_step); + GL.Vertex2(x + GlyphWidth, y + GlyphHeight); + GL.TexCoord2(u, v + v_step); + GL.Vertex2(x, y + GlyphHeight); + + x += CharXSpacing; + } + + GL.End(); + } + } +} diff --git a/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.Designer.cs b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.Designer.cs new file mode 100644 index 00000000..57512f6e --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.Designer.cs @@ -0,0 +1,109 @@ +namespace Toolbox.Library.Forms +{ + partial class ColorSelectorDropdown + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ColorSelectorDropdown)); + this.colorSelector1 = new Toolbox.Library.Forms.ColorSelector(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.pictureBoxCustom1 = new Toolbox.Library.Forms.PictureBoxCustom(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).BeginInit(); + this.SuspendLayout(); + // + // colorSelector1 + // + this.colorSelector1.Alpha = 0; + this.colorSelector1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.colorSelector1.Color = System.Drawing.Color.Empty; + this.colorSelector1.Color8 = null; + this.colorSelector1.DisplayAlpha = true; + this.colorSelector1.DisplayColor = true; + this.colorSelector1.Location = new System.Drawing.Point(3, 3); + this.colorSelector1.Name = "colorSelector1"; + this.colorSelector1.Size = new System.Drawing.Size(245, 243); + this.colorSelector1.TabIndex = 0; + this.colorSelector1.ColorChanged += new System.EventHandler(this.colorSelector1_ColorChanged); + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.Location = new System.Drawing.Point(254, 3); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(30, 30); + this.pictureBox1.TabIndex = 1; + this.pictureBox1.TabStop = false; + // + // pictureBox2 + // + this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox2.Location = new System.Drawing.Point(254, 39); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(30, 30); + this.pictureBox2.TabIndex = 2; + this.pictureBox2.TabStop = false; + // + // pictureBoxCustom1 + // + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); + this.pictureBoxCustom1.Location = new System.Drawing.Point(254, 75); + this.pictureBoxCustom1.Name = "pictureBoxCustom1"; + this.pictureBoxCustom1.Size = new System.Drawing.Size(30, 30); + this.pictureBoxCustom1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoxCustom1.TabIndex = 3; + this.pictureBoxCustom1.TabStop = false; + // + // ColorSelectorDropdown + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pictureBoxCustom1); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.colorSelector1); + this.Name = "ColorSelectorDropdown"; + this.Size = new System.Drawing.Size(292, 244); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private ColorSelector colorSelector1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.PictureBox pictureBox2; + private PictureBoxCustom pictureBoxCustom1; + } +} diff --git a/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.cs b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.cs new file mode 100644 index 00000000..f7d27510 --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Toolbox.Library.Forms +{ + public partial class ColorSelectorDropdown : STUserControl + { + public STColor8 Color8 + { + get { return colorSelector1.Color8; } + set { colorSelector1.Color8 = value; } + } + + public Color Color + { + get { return colorSelector1.Color; } + set { colorSelector1.Color = value; } + } + + public Color AlphaColor + { + get { return colorSelector1.AlphaColor; } + } + + public int Alpha + { + get { return colorSelector1.Alpha; } + set { colorSelector1.Alpha = value; } + } + + public ColorSelectorDropdown() + { + InitializeComponent(); + } + + private void colorSelector1_ColorChanged(object sender, EventArgs e) + { + pictureBox1.BackColor = colorSelector1.Color; + pictureBox2.BackColor = colorSelector1.AlphaColor; + + var fullColor = Color.FromArgb(colorSelector1.Alpha, colorSelector1.Color); + pictureBoxCustom1.Image = BitmapExtension.FillColor(30,30, fullColor); + } + } +} diff --git a/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.resx b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.resx new file mode 100644 index 00000000..87e8cbc9 --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Dialogs/ColorSelectorDropdown.resx @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAADAFBMVEXMzMzNzc3Ozs7Pz8/Q0NDR0dHS + 0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm + 5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6 + +vr7+/v8/Pz9/f3+/v7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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y6lYpGI5FcuoWEbFMiqWUbGcikUqllOx6H9SrPj/tlaxXlGxSHcsp2KR + iuVULKNimXqxdsE8PgN0joCW8TmjKQITH+A5XiKgOGNYIKBNfIBntkZC8VmmSYUAtgsEZoaENrXnvq6Q + wKZAQMN4HYtwEv35BgnUnvuahhds44x+OIldGU5zkCOgVW25EZg8nOYorNUuPi91MEVg4lql8TSLOOMK + T8Q0kwOemQmnDAEN10jgvEJgFmdEsB0goCzMOOQIqF17zmh47muzCjM28TmjQwR0niCgzhYJVeE5o+3a + s0zjs2WH4YGq91l4lmm/9izTcB2156Xeh5NoJuFZpqf4TNZemHHeITCz8FjXfXwEbnxe6qlEYLZhueMz + WZtFWIratmJtTTba8+60592oWEbFMiqWUbHcP6NY+iS0UbGc7likYjkVi1Qsp2IZFcuoWOYjiqWfsUjF + MrpjGRXLqVikYjkVi1Qs96sUS3+PZVQspzsWqVhOxSIVy6lYRsUy9WLlQRHhuMHhVxAYHH4FgcFhg8MO + xw0Ov4LA4bjBYYPDDscNDr+CwOE44ajDcYPDDsdfQWBw+BUEBocNDjscNzjscPwVBAaHDQ6/goBw1OTv + PhP65gOeCX1AQPGZ0HfvPxM6PEv5hzwT+owEas+Ebnz8M6GfZwhMfNjyu8+EPn/8M6Fv6s+ERkL/xjOh + cesy2vNO2vPu4g8z8ZunPkzhVCyjYjkVi1Qsp2KRiuVULKNiGRXLqFhGxXIqFqlYTsUiFcupWEbFMiqW + UbGMiuVULFKxnIpFKpZTsYyKZVQso2KZH1Is/D4jM+80LrRKBLQZIoHmCIFJmoigv0FAZZjRKRDQqYuE + kvArnu7TMGOwQkBrBGaOgI59BJSFX8p1KhBQJ17HuoWEyvhbosYIaBiu4xxnNGq/GayHAJq139oVZ/QQ + mGk4zW7tt3aFGa0JAhPXKv5Grfv8ckaj93+veSuXxEAIUwAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Switch_Toolbox_Library/Forms/Editors/TextEditor/TextEditor.cs b/Switch_Toolbox_Library/Forms/Editors/TextEditor/TextEditor.cs index bf7f5277..8f74d01d 100644 --- a/Switch_Toolbox_Library/Forms/Editors/TextEditor/TextEditor.cs +++ b/Switch_Toolbox_Library/Forms/Editors/TextEditor/TextEditor.cs @@ -149,9 +149,19 @@ namespace Toolbox.Library.Forms FillEditor(""); } + private Color BACK_COLOR = Color.FromArgb(30, 30, 30); private Color FORE_COLOR = Color.White; + public void AddContextMenu(string text, EventHandler handler) + { + foreach (ToolStripItem item in stContextMenuStrip1.Items) + if (item.Text == text) + return; + + stContextMenuStrip1.Items.Add(text, null, handler); + } + public string GetText() { return scintilla1.Text; diff --git a/Switch_Toolbox_Library/Helpers/TreeHelper.cs b/Switch_Toolbox_Library/Helpers/TreeHelper.cs index 2bb78694..16e19572 100644 --- a/Switch_Toolbox_Library/Helpers/TreeHelper.cs +++ b/Switch_Toolbox_Library/Helpers/TreeHelper.cs @@ -160,7 +160,9 @@ namespace Toolbox.Library } } - FileList.Add(Tuple.Create(tempf, $"{targetDirectory}/{fileName}")); + Console.WriteLine($"{tempf} {targetDirectory} {fileName}"); + + FileList.Add(Tuple.Create(fileName, $"{targetDirectory}/{fileName}")); } string[] subdirectoryEntries = Directory.GetDirectories(targetDirectory); diff --git a/Switch_Toolbox_Library/IO/Colors/ColorEditor.cs b/Switch_Toolbox_Library/IO/Colors/ColorEditor.cs index 48f47b50..308fa50e 100644 --- a/Switch_Toolbox_Library/IO/Colors/ColorEditor.cs +++ b/Switch_Toolbox_Library/IO/Colors/ColorEditor.cs @@ -29,7 +29,7 @@ namespace Toolbox.Library.IO if (frmsvr == null) return null; - var control = new ColorSelector(); + var control = new ColorSelectorDropdown(); Color color = Color.White; if (value is STColor8) diff --git a/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs b/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs index 1c3fb75a..923ae25e 100644 --- a/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs +++ b/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs @@ -79,9 +79,7 @@ namespace Toolbox.Library [Browsable(false)] public virtual IFileFormat OpenFile() { - if (FileFormat != null && - FileFormat.IFileInfo != null && - FileFormat.IFileInfo.ArchiveParent != null) + if (FileFormat != null) return FileFormat; if (FileDataStream != null) diff --git a/Switch_Toolbox_Library/Properties/Resources.Designer.cs b/Switch_Toolbox_Library/Properties/Resources.Designer.cs index ff980afa..ba09dfcb 100644 --- a/Switch_Toolbox_Library/Properties/Resources.Designer.cs +++ b/Switch_Toolbox_Library/Properties/Resources.Designer.cs @@ -360,6 +360,16 @@ namespace Toolbox.Library.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Font { + get { + object obj = ResourceManager.GetObject("Font", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Switch_Toolbox_Library/Properties/Resources.resx b/Switch_Toolbox_Library/Properties/Resources.resx index 15e2a93b..aaaebcb5 100644 --- a/Switch_Toolbox_Library/Properties/Resources.resx +++ b/Switch_Toolbox_Library/Properties/Resources.resx @@ -382,4 +382,7 @@ ..\Resources\arrowMinimize .png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Switch_Toolbox_Library/Resources/Font.png b/Switch_Toolbox_Library/Resources/Font.png new file mode 100644 index 0000000000000000000000000000000000000000..57ab1b8a2c826ba4be54a83d8ac0bb24e430978e GIT binary patch literal 3065 zcmVpPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ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8;Pbf&!^+k6VTd-xyx%Y|{j9c=et#LQ%J2mtAT#ihmH$o$;ekj5nvu)Mal5h4NG zTTdGy60o}uv=L$fx(Lw#9fWwmD})h%G=wpLB!p3bID~P4XN1^QLN@>;-8eY8Ohg}L za%f}^m>rv{A;+^+Q+{Zx`fycMSjV$e-4E^T0h2?6iHPlPA+{dZXoL^}81L(`&7=XM zsYR2?6yS$8m)(5gWRjk=<5@BQqjilt)6(03;i}60c}4DP^c6t-cK`qY0001h{{}=m z(z`oP=73@)mwE;WPA*Pl0000000000006%R;9m&<((@PqKRiuYc+{3f00000NkvXX Hu0mjfZfvFR literal 0 HcmV?d00001 diff --git a/Switch_Toolbox_Library/Toolbox_Library.csproj b/Switch_Toolbox_Library/Toolbox_Library.csproj index bfa3188a..0350a625 100644 --- a/Switch_Toolbox_Library/Toolbox_Library.csproj +++ b/Switch_Toolbox_Library/Toolbox_Library.csproj @@ -240,6 +240,12 @@ UserControl + + UserControl + + + ColorSelectorDropdown.cs + Form @@ -891,6 +897,9 @@ STTextBox.cs + + ColorSelectorDropdown.cs + ExportModelSettings.cs @@ -1277,6 +1286,7 @@ + @@ -1350,6 +1360,9 @@ + + +