mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-12-24 03:43:08 +00:00
dd15ef59c5
Added NUT support (viewing GX2 and DDS texture data) Fixed importing uncompressed dds using the mask data. Add EFE support from smash 4 wii u and 3ds. Redo the shader param editor. Uses a list again for faster access and viewing. I will have items drop down from a floating window next to the item soon.
62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
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 Bfres.Structs;
|
|
using Syroot.NintenTools.NSW.Bfres;
|
|
using Switch_Toolbox.Library.Forms;
|
|
|
|
namespace FirstPlugin.Forms
|
|
{
|
|
public partial class TexSrtPanel : ParamValueEditorBase
|
|
{
|
|
public TexSrtPanel(TexSrt TexSrt, BfresShaderParam param)
|
|
{
|
|
InitializeComponent();
|
|
|
|
activeParam = param;
|
|
stTextBox1.Bind(activeParam, "Name");
|
|
|
|
scalingModeCN.Bind(typeof(TexSrtMode), TexSrt, "Mode");
|
|
scalingModeCN.SelectedItem = TexSrt.Mode;
|
|
|
|
scaXUD.DataType = typeof(float);
|
|
scaYUD.DataType = typeof(float);
|
|
rotXUD.DataType = typeof(float);
|
|
transXUD.DataType = typeof(float);
|
|
transYUD.DataType = typeof(float);
|
|
|
|
scaXUD.Value = TexSrt.Scaling.X;
|
|
scaYUD.Value = TexSrt.Scaling.Y;
|
|
|
|
rotXUD.Value = TexSrt.Rotation;
|
|
|
|
transXUD.Value = TexSrt.Translation.X;
|
|
transYUD.Value = TexSrt.Translation.Y;
|
|
}
|
|
|
|
public void ApplyValues()
|
|
{
|
|
activeParam.ValueTexSrt = new TexSrt
|
|
{
|
|
Mode = (TexSrtMode)scalingModeCN.SelectedItem,
|
|
Scaling = new Syroot.Maths.Vector2F(scaXUD.Value, scaYUD.Value),
|
|
Rotation = rotXUD.Value,
|
|
Translation = new Syroot.Maths.Vector2F(transXUD.Value, transYUD.Value),
|
|
};
|
|
|
|
if (OnPanelChanged != null)
|
|
OnPanelChanged(activeParam, this);
|
|
}
|
|
|
|
private void barSlider_ValueChanged(object sender, EventArgs e)
|
|
{
|
|
ApplyValues();
|
|
}
|
|
}
|
|
}
|