mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 15:14:55 +00:00
Fix dim settings
This commit is contained in:
parent
92cf46372c
commit
5735fcf806
3 changed files with 22 additions and 3 deletions
|
@ -1353,6 +1353,8 @@ namespace FirstPlugin
|
|||
//The tex format can be adjusted in the function if necessary. Will normally be set to format in settings
|
||||
public void Replace(string FileName, uint MaxMipLevel = 0, TEX_FORMAT DefaultFormat = TEX_FORMAT.BC1_UNORM_SRGB, SurfaceDim surfaceDim = SurfaceDim.Dim2D)
|
||||
{
|
||||
Console.WriteLine("surfaceDim" + surfaceDim);
|
||||
|
||||
string ext = Path.GetExtension(FileName);
|
||||
ext = ext.ToLower();
|
||||
|
||||
|
|
|
@ -192,15 +192,16 @@
|
|||
this.ImgDimComb.ReadOnly = true;
|
||||
this.ImgDimComb.Size = new System.Drawing.Size(230, 21);
|
||||
this.ImgDimComb.TabIndex = 24;
|
||||
this.ImgDimComb.SelectedIndexChanged += new System.EventHandler(this.ImgDimComb_SelectedIndexChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(756, 136);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(88, 13);
|
||||
this.label3.Size = new System.Drawing.Size(96, 13);
|
||||
this.label3.TabIndex = 23;
|
||||
this.label3.Text = "Image Dimension";
|
||||
this.label3.Text = "Surface Dimension";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
|
@ -299,6 +300,7 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1096, 560);
|
||||
this.KeyPreview = true;
|
||||
this.Name = "BinaryTextureImporterList";
|
||||
this.Text = "Texture Importer";
|
||||
this.Load += new System.EventHandler(this.BinaryTextureImporterList_Load);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BinaryTextureImporterList_KeyDown);
|
||||
|
|
|
@ -131,13 +131,18 @@ namespace FirstPlugin
|
|||
if (SelectedTexSettings.Format == SurfaceFormat.Invalid || SelectedIndex == -1)
|
||||
return;
|
||||
|
||||
|
||||
WidthLabel.Text = $"Width {SelectedTexSettings.TexWidth}";
|
||||
HeightLabel.Text = $"Height {SelectedTexSettings.TexHeight}";
|
||||
|
||||
if (Thread != null && Thread.IsAlive)
|
||||
Thread.Abort();
|
||||
|
||||
if (formatComboBox.SelectedItem is SurfaceFormat)
|
||||
if (formatComboBox.SelectedItem is SurfaceDim)
|
||||
SelectedTexSettings.SurfaceDim = (SurfaceDim)formatComboBox.SelectedItem;
|
||||
|
||||
|
||||
if (formatComboBox.SelectedItem is SurfaceFormat)
|
||||
{
|
||||
SelectedTexSettings.Format = (SurfaceFormat)formatComboBox.SelectedItem;
|
||||
|
||||
|
@ -249,6 +254,8 @@ namespace FirstPlugin
|
|||
|
||||
SelectedTexSettings = settings[listViewCustom1.SelectedIndices[0]];
|
||||
formatComboBox.SelectedItem = SelectedTexSettings.Format;
|
||||
ImgDimComb.SelectedItem = SelectedTexSettings.SurfaceDim;
|
||||
|
||||
|
||||
SetupSettings();
|
||||
|
||||
|
@ -299,5 +306,13 @@ namespace FirstPlugin
|
|||
SetupSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void ImgDimComb_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ImgDimComb.SelectedIndex > -1 && SelectedTexSettings != null)
|
||||
{
|
||||
SetupSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue