1
0
mirror of synced 2024-12-02 19:17:24 +01:00
Switch-Toolbox/Switch_FileFormatsMain/GUI/BFRES/BfresShaderParams/BoolValuesPanel.cs
2018-11-11 20:51:12 -05:00

61 lines
1.4 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 Switch_Toolbox.Library;
namespace FirstPlugin
{
public partial class BoolValuesPanel : UserControl
{
public BoolValuesPanel()
{
InitializeComponent();
}
public void LoadValues(bool[] values)
{
bool1.Visible = false;
bool2.Visible = false;
bool3.Visible = false;
bool4.Visible = false;
if (values.Length >= 1)
{
bool1.Visible = true;
bool1.Checked = values[0];
}
if (values.Length >= 2)
{
bool2.Visible = true;
bool2.Checked = values[1];
}
if (values.Length >= 3)
{
bool3.Visible = true;
bool3.Checked = values[2];
}
if (values.Length >= 4)
{
bool4.Visible = true;
bool4.Checked = values[3];
}
}
private void BoolValuesPanel_Load(object sender, EventArgs e)
{
}
private void bool_CheckedChanged(object sender, EventArgs e)
{
Viewport.Instance.UpdateViewport();
}
}
}