bugfixes
This commit is contained in:
@@ -27,19 +27,25 @@ namespace SplashEdit.EditorCode
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.Label("Quantized Preview", EditorStyles.boldLabel);
|
||||
GUILayout.Label("Quantized Preview", PSXEditorStyles.WindowHeader);
|
||||
|
||||
// Texture input field
|
||||
PSXEditorStyles.BeginCard();
|
||||
originalTexture = (Texture2D)EditorGUILayout.ObjectField("Original Texture", originalTexture, typeof(Texture2D), false);
|
||||
|
||||
// Dropdown for bit depth selection
|
||||
bpp = (PSXBPP)EditorGUILayout.EnumPopup("Bit Depth", bpp);
|
||||
|
||||
EditorGUILayout.Space(4);
|
||||
|
||||
// Button to generate the quantized preview
|
||||
if (GUILayout.Button("Generate Quantized Preview") && originalTexture != null)
|
||||
if (GUILayout.Button("Generate Quantized Preview", PSXEditorStyles.PrimaryButton, GUILayout.Height(26)) && originalTexture != null)
|
||||
{
|
||||
GenerateQuantizedPreview();
|
||||
}
|
||||
PSXEditorStyles.EndCard();
|
||||
|
||||
PSXEditorStyles.DrawSeparator(4, 4);
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
@@ -47,7 +53,7 @@ namespace SplashEdit.EditorCode
|
||||
if (originalTexture != null)
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label("Original Texture");
|
||||
GUILayout.Label("Original Texture", PSXEditorStyles.CardHeaderStyle);
|
||||
DrawTexturePreview(originalTexture, previewSize, false);
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
@@ -56,7 +62,7 @@ namespace SplashEdit.EditorCode
|
||||
if (vramTexture != null)
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label("VRAM View (Indexed Data as 16bpp)");
|
||||
GUILayout.Label("VRAM View (Indexed Data as 16bpp)", PSXEditorStyles.CardHeaderStyle);
|
||||
DrawTexturePreview(vramTexture, previewSize);
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
@@ -65,7 +71,7 @@ namespace SplashEdit.EditorCode
|
||||
if (quantizedTexture != null)
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label("Quantized Texture");
|
||||
GUILayout.Label("Quantized Texture", PSXEditorStyles.CardHeaderStyle);
|
||||
DrawTexturePreview(quantizedTexture, previewSize);
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
@@ -75,16 +81,17 @@ namespace SplashEdit.EditorCode
|
||||
// Display the Color Lookup Table (CLUT)
|
||||
if (clut != null)
|
||||
{
|
||||
GUILayout.Label("Color Lookup Table (CLUT)");
|
||||
PSXEditorStyles.DrawSeparator(4, 4);
|
||||
GUILayout.Label("Color Lookup Table (CLUT)", PSXEditorStyles.SectionHeader);
|
||||
DrawCLUT();
|
||||
}
|
||||
|
||||
GUILayout.Space(10);
|
||||
PSXEditorStyles.DrawSeparator(4, 4);
|
||||
|
||||
// Export indexed pixel data
|
||||
if (indexedPixelData != null)
|
||||
{
|
||||
if (GUILayout.Button("Export texture data"))
|
||||
if (GUILayout.Button("Export texture data", PSXEditorStyles.SecondaryButton, GUILayout.Height(24)))
|
||||
{
|
||||
string path = EditorUtility.SaveFilePanel("Save texture data", "", "pixel_data", "bin");
|
||||
|
||||
@@ -105,7 +112,7 @@ namespace SplashEdit.EditorCode
|
||||
// Export CLUT data
|
||||
if (clut != null)
|
||||
{
|
||||
if (GUILayout.Button("Export CLUT data"))
|
||||
if (GUILayout.Button("Export CLUT data", PSXEditorStyles.SecondaryButton, GUILayout.Height(24)))
|
||||
{
|
||||
string path = EditorUtility.SaveFilePanel("Save CLUT data", "", "clut_data", "bin");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user