mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-12-21 10:23:07 +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.
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using Syroot.NintenTools.NSW.Bfres;
|
|
using Bfres.Structs;
|
|
using System.Collections.Generic;
|
|
|
|
namespace FirstPlugin.Forms
|
|
{
|
|
public partial class booleanPanel : ParamValueEditorBase
|
|
{
|
|
public booleanPanel(bool[] values, BfresShaderParam param)
|
|
{
|
|
InitializeComponent();
|
|
|
|
activeParam = param;
|
|
stTextBox1.Bind(activeParam, "Name");
|
|
|
|
if (values.Length >= 1)
|
|
stCheckBox1.Checked = values[0];
|
|
if (values.Length >= 2)
|
|
stCheckBox1.Checked = values[1];
|
|
if (values.Length >= 3)
|
|
stCheckBox1.Checked = values[2];
|
|
if (values.Length >= 4)
|
|
stCheckBox1.Checked = values[3];
|
|
}
|
|
|
|
private void barSlider1_ValueChanged(object sender, System.EventArgs e)
|
|
{
|
|
List<bool> values = new List<bool>();
|
|
|
|
if (activeParam.Type == ShaderParamType.Bool)
|
|
{
|
|
values.Add(stCheckBox1.Checked);
|
|
}
|
|
if (activeParam.Type == ShaderParamType.Bool2)
|
|
{
|
|
values.Add(stCheckBox1.Checked);
|
|
values.Add(stCheckBox2.Checked);
|
|
}
|
|
if (activeParam.Type == ShaderParamType.Bool3)
|
|
{
|
|
values.Add(stCheckBox1.Checked);
|
|
values.Add(stCheckBox2.Checked);
|
|
values.Add(stCheckBox3.Checked);
|
|
}
|
|
if (activeParam.Type == ShaderParamType.Bool4)
|
|
{
|
|
values.Add(stCheckBox1.Checked);
|
|
values.Add(stCheckBox2.Checked);
|
|
values.Add(stCheckBox3.Checked);
|
|
values.Add(stCheckBox4.Checked);
|
|
}
|
|
|
|
activeParam.ValueBool = values.ToArray();
|
|
|
|
if (OnPanelChanged != null)
|
|
OnPanelChanged(activeParam, this);
|
|
}
|
|
}
|
|
}
|