1
0
mirror of synced 2025-02-25 22:38:07 +01:00

Some UI for actor editor

This commit is contained in:
KillzXGaming 2019-08-10 21:14:06 -04:00
parent 9f829b714b
commit a49315e029
8 changed files with 296 additions and 61 deletions

Binary file not shown.

View File

@ -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);
}
}

View File

@ -301,11 +301,11 @@
<Compile Include="GL\GXToOpenGL.cs" />
<Compile Include="GL\KCL_Render.cs" />
<Compile Include="GL\LM2_Render.cs" />
<Compile Include="GUI\ActorEditorBotw.cs">
<Compile Include="GUI\BotwActorEditorControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GUI\ActorEditorBotw.Designer.cs">
<DependentUpon>ActorEditorBotw.cs</DependentUpon>
<Compile Include="GUI\BotwActorEditorControl.Designer.cs">
<DependentUpon>BotwActorEditorControl.cs</DependentUpon>
</Compile>
<Compile Include="GUI\BFFNT\BffntEditor.cs">
<SubType>UserControl</SubType>
@ -1194,6 +1194,9 @@
<EmbeddedResource Include="GUI\BMD\BMDModelImportSettings.resx">
<DependentUpon>BMDModelImportSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\BotwActorEditorControl.resx">
<DependentUpon>BotwActorEditorControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\Byaml\CourseMuunt\TurboMunntEditor.resx">
<DependentUpon>TurboMunntEditor.cs</DependentUpon>
</EmbeddedResource>

View File

@ -1,37 +0,0 @@
namespace FirstPlugin.Forms
{
partial class ActorEditorBotw
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -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();
}
}
}

View File

@ -0,0 +1,124 @@
namespace UKing.Actors.Forms
{
partial class BotwActorEditorControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@ -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);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>