diff --git a/.vs/Toolbox/v15/.suo b/.vs/Toolbox/v15/.suo index c40921b8..fb0f10e0 100644 Binary files a/.vs/Toolbox/v15/.suo and b/.vs/Toolbox/v15/.suo differ diff --git a/File_Format_Library/Actors/BotwActorLoader.cs b/File_Format_Library/Actors/BotwActorLoader.cs index 3e1c29dd..bcdd46e8 100644 --- a/File_Format_Library/Actors/BotwActorLoader.cs +++ b/File_Format_Library/Actors/BotwActorLoader.cs @@ -8,6 +8,7 @@ using Toolbox.Library.Forms; using System.IO; using OpenTK; using FirstPlugin; +using UKing.Actors.Forms; namespace UKing.Actors { @@ -279,6 +280,7 @@ namespace UKing.Actors } ActorEntry entry = new ActorEntry(); + entry.Info = info.Value; entry.Text = info.Value.MessageName; Categories[catgeory].Nodes.Add(entry); } @@ -332,6 +334,8 @@ namespace UKing.Actors public ActorModel Models { get; set; } public ActorTextures Textures { get; set; } + public ActorInfo Info { get; set; } + public void ReloadActorProperties() { Textures = new ActorTextures(); @@ -344,7 +348,20 @@ namespace UKing.Actors public override void OnClick(TreeView treeview) { + UpdateEditor(); + } + public void UpdateEditor() + { + BotwActorEditorControl editor = (BotwActorEditorControl)LibraryGUI.GetActiveContent(typeof(BotwActorEditorControl)); + if (editor == null) + { + editor = new BotwActorEditorControl(); + editor.Dock = DockStyle.Fill; + LibraryGUI.LoadEditor(editor); + } + editor.Text = Text; + editor.LoadActor(this); } } diff --git a/File_Format_Library/File_Format_Library.csproj b/File_Format_Library/File_Format_Library.csproj index 4bd026fd..119bc2c8 100644 --- a/File_Format_Library/File_Format_Library.csproj +++ b/File_Format_Library/File_Format_Library.csproj @@ -301,11 +301,11 @@ - + UserControl - - ActorEditorBotw.cs + + BotwActorEditorControl.cs UserControl @@ -1194,6 +1194,9 @@ BMDModelImportSettings.cs + + BotwActorEditorControl.cs + TurboMunntEditor.cs diff --git a/File_Format_Library/GUI/ActorEditorBotw.Designer.cs b/File_Format_Library/GUI/ActorEditorBotw.Designer.cs deleted file mode 100644 index bd8a8bc8..00000000 --- a/File_Format_Library/GUI/ActorEditorBotw.Designer.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace FirstPlugin.Forms -{ - partial class ActorEditorBotw - { - /// - /// 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() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/File_Format_Library/GUI/ActorEditorBotw.cs b/File_Format_Library/GUI/ActorEditorBotw.cs deleted file mode 100644 index fc686dff..00000000 --- a/File_Format_Library/GUI/ActorEditorBotw.cs +++ /dev/null @@ -1,21 +0,0 @@ -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; -using Toolbox.Library.Forms; - -namespace FirstPlugin.Forms -{ - public partial class ActorEditorBotw : STUserControl - { - public ActorEditorBotw() - { - InitializeComponent(); - } - } -} diff --git a/File_Format_Library/GUI/BotwActorEditorControl.Designer.cs b/File_Format_Library/GUI/BotwActorEditorControl.Designer.cs new file mode 100644 index 00000000..577e69ab --- /dev/null +++ b/File_Format_Library/GUI/BotwActorEditorControl.Designer.cs @@ -0,0 +1,124 @@ +namespace UKing.Actors.Forms +{ + partial class BotwActorEditorControl + { + /// + /// 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() + { + this.stTabControl1 = new Toolbox.Library.Forms.STTabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.stPropertyGrid1 = new Toolbox.Library.Forms.STPropertyGrid(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.tabPage4 = new System.Windows.Forms.TabPage(); + this.stTabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // stTabControl1 + // + this.stTabControl1.Controls.Add(this.tabPage1); + this.stTabControl1.Controls.Add(this.tabPage2); + this.stTabControl1.Controls.Add(this.tabPage3); + this.stTabControl1.Controls.Add(this.tabPage4); + this.stTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stTabControl1.Location = new System.Drawing.Point(0, 0); + this.stTabControl1.myBackColor = System.Drawing.Color.Empty; + this.stTabControl1.Name = "stTabControl1"; + this.stTabControl1.SelectedIndex = 0; + this.stTabControl1.Size = new System.Drawing.Size(691, 528); + this.stTabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.stPropertyGrid1); + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(683, 499); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Actor Info"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(683, 499); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Actor Params"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // stPropertyGrid1 + // + this.stPropertyGrid1.AutoScroll = true; + this.stPropertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stPropertyGrid1.Location = new System.Drawing.Point(3, 3); + this.stPropertyGrid1.Name = "stPropertyGrid1"; + this.stPropertyGrid1.ShowHintDisplay = true; + this.stPropertyGrid1.Size = new System.Drawing.Size(677, 493); + this.stPropertyGrid1.TabIndex = 0; + // + // tabPage3 + // + this.tabPage3.Location = new System.Drawing.Point(4, 25); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(683, 499); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Actor Preview"; + // + // tabPage4 + // + this.tabPage4.Location = new System.Drawing.Point(4, 25); + this.tabPage4.Name = "tabPage4"; + this.tabPage4.Size = new System.Drawing.Size(683, 499); + this.tabPage4.TabIndex = 3; + this.tabPage4.Text = "Actor Message Data"; + // + // BotwActorEditorControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.stTabControl1); + this.Name = "BotwActorEditorControl"; + this.Size = new System.Drawing.Size(691, 528); + this.stTabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private Toolbox.Library.Forms.STTabControl stTabControl1; + private System.Windows.Forms.TabPage tabPage1; + private Toolbox.Library.Forms.STPropertyGrid stPropertyGrid1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.TabPage tabPage4; + } +} diff --git a/File_Format_Library/GUI/BotwActorEditorControl.cs b/File_Format_Library/GUI/BotwActorEditorControl.cs new file mode 100644 index 00000000..b1ff70da --- /dev/null +++ b/File_Format_Library/GUI/BotwActorEditorControl.cs @@ -0,0 +1,29 @@ +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; +using Toolbox.Library.Forms; +using UKing.Actors; + +namespace UKing.Actors.Forms +{ + public partial class BotwActorEditorControl : STUserControl + { + public BotwActorEditorControl() + { + InitializeComponent(); + + stTabControl1.myBackColor = FormThemes.BaseTheme.FormBackColor; + } + + public void LoadActor(BotwActorLoader.ActorEntry entry) + { + stPropertyGrid1.LoadProperty(entry.Info); + } + } +} diff --git a/File_Format_Library/GUI/BotwActorEditorControl.resx b/File_Format_Library/GUI/BotwActorEditorControl.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/File_Format_Library/GUI/BotwActorEditorControl.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