Load components by default now
This commit is contained in:
parent
7cdd454466
commit
8962f34e50
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -119,7 +119,7 @@
|
||||
this.columnHeader11,
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.shaderParamListView.Location = new System.Drawing.Point(3, 35);
|
||||
this.shaderParamListView.Location = new System.Drawing.Point(3, 32);
|
||||
this.shaderParamListView.MultiSelect = false;
|
||||
this.shaderParamListView.Name = "shaderParamListView";
|
||||
this.shaderParamListView.OwnerDraw = true;
|
||||
@ -149,7 +149,7 @@
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "";
|
||||
this.columnHeader2.Width = 12;
|
||||
this.columnHeader2.Width = 25;
|
||||
//
|
||||
// ShaderParamEditor
|
||||
//
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -361,17 +361,32 @@ namespace Switch_Toolbox.Library.Forms
|
||||
BitmapExtension.SetChannel(image, STChannelType.Alpha, STChannelType.Alpha, STChannelType.Alpha, STChannelType.One);
|
||||
else
|
||||
{
|
||||
if (Runtime.ImageEditor.UseComponetSelector)
|
||||
STChannelType AlphaDisplay = ActiveTexture.AlphaChannel;
|
||||
if (!Runtime.ImageEditor.DisplayAlpha || HasZeroAlpha())
|
||||
AlphaDisplay = STChannelType.One;
|
||||
|
||||
//For RGBA types try to only load the alpha toggle to load quicker
|
||||
//Loading components would not be necessary as it is default to RGBA
|
||||
if (UseRGBA())
|
||||
{
|
||||
if (Runtime.ImageEditor.DisplayAlpha)
|
||||
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, ActiveTexture.AlphaChannel);
|
||||
else
|
||||
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, STChannelType.One);
|
||||
BitmapExtension.SetChannel(image, STChannelType.Red, STChannelType.Green, STChannelType.Blue, AlphaDisplay);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Runtime.ImageEditor.DisplayAlpha)
|
||||
BitmapExtension.SetChannel(image, STChannelType.Red, STChannelType.Green, STChannelType.Blue, STChannelType.One);
|
||||
//Check components for the channels
|
||||
if (Runtime.ImageEditor.UseComponetSelector)
|
||||
{
|
||||
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, AlphaDisplay);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UseRGBA())
|
||||
{
|
||||
if (Runtime.ImageEditor.DisplayAlpha)
|
||||
BitmapExtension.SetChannel(image, STChannelType.Red, STChannelType.Green, STChannelType.Blue, AlphaDisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -383,6 +398,25 @@ namespace Switch_Toolbox.Library.Forms
|
||||
|
||||
}
|
||||
|
||||
private bool HasZeroAlpha()
|
||||
{
|
||||
if (ActiveTexture.AlphaChannel == STChannelType.Zero)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool UseRGBA()
|
||||
{
|
||||
if (ActiveTexture.RedChannel == STChannelType.Red &&
|
||||
ActiveTexture.GreenChannel == STChannelType.Green &&
|
||||
ActiveTexture.BlueChannel == STChannelType.Blue &&
|
||||
ActiveTexture.AlphaChannel == STChannelType.Alpha)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private void PushImage(Image image)
|
||||
{
|
||||
if (pictureBoxCustom1.InvokeRequired)
|
||||
|
@ -27,7 +27,7 @@ namespace Switch_Toolbox.Library
|
||||
public static bool DisplayVertical = false;
|
||||
|
||||
public static bool DisplayAlpha = true;
|
||||
public static bool UseComponetSelector = false;
|
||||
public static bool UseComponetSelector = true;
|
||||
|
||||
}
|
||||
public class ObjectEditor
|
||||
|
Loading…
x
Reference in New Issue
Block a user