1
0
mirror of synced 2024-12-15 00:51:36 +01:00
Switch-Toolbox/Switch_FileFormatsMain/GUI/BFRES/AnimKeyViewer.cs
KillzXGaming 2a92afa122 Chr0 animation importing, dae exporting and tons more improvements!
Chr0 can be imported/replaced.
More fixes to importing sections including some errors and proper filtering.
Dae epxorting now has a progress bar and an option to idsable texture exporting.
Bfska can now be swapped between platforms. More sections will handle this method soon!.
Fixed spaces on files from "Export All".
Display multiple texture maps in bcres materials
2019-05-24 15:15:35 -04:00

71 lines
2.0 KiB
C#

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 Switch_Toolbox.Library;
using Switch_Toolbox.Library.Forms;
using Switch_Toolbox.Library.Animations;
namespace FirstPlugin.Forms
{
public partial class AnimKeyViewer : STForm
{
public AnimKeyViewer()
{
InitializeComponent();
CanResize = false;
stListView1.BackColor = FormThemes.BaseTheme.FormBackColor;
stListView1.ForeColor = FormThemes.BaseTheme.FormForeColor;
}
Animation.KeyGroup acitveGroup;
public void LoadKeyData(Animation.KeyGroup keyGroup)
{
acitveGroup = keyGroup;
stListView1.View = View.Details;
stListView1.HeaderStyle = ColumnHeaderStyle.None;
foreach (var key in keyGroup.Keys)
{
stListView1.Items.Add($"Frame: [{key.Frame}] Value: {key.Value}");
}
}
private void stListView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (stListView1.SelectedItems.Count > 0)
{
var keyFrame = acitveGroup.Keys[stListView1.SelectedIndices[0]];
stLabel1.Text = $"key Frame {keyFrame.Frame}";
numericUpDownFloat1.Value = (decimal)keyFrame.Value1;
numericUpDownFloat2.Value = (decimal)keyFrame.Slope1;
numericUpDownFloat3.Value = (decimal)keyFrame.Slope2;
numericUpDownFloat4.Value = (decimal)keyFrame.Delta;
}
else
{
stLabel1.Text = $"";
numericUpDownFloat1.Value = 0;
numericUpDownFloat2.Value = 0;
numericUpDownFloat3.Value = 0;
numericUpDownFloat4.Value = 0;
}
}
private void stButton2_Click(object sender, EventArgs e)
{
}
}
}