Broken UI system

This commit is contained in:
Jan Racek
2026-03-25 12:25:48 +01:00
parent bb8e0804f5
commit 8914ba35cc
28 changed files with 2094 additions and 25 deletions

33
Runtime/PSXUIBox.cs Normal file
View File

@@ -0,0 +1,33 @@
using UnityEngine;
namespace SplashEdit.RuntimeCode
{
/// <summary>
/// A solid-color rectangle UI element for PSX export.
/// Rendered as a FastFill primitive on PS1 hardware.
/// Attach to a child of a PSXCanvas GameObject.
/// </summary>
[RequireComponent(typeof(RectTransform))]
[DisallowMultipleComponent]
[AddComponentMenu("PSX/UI/PSX UI Box")]
public class PSXUIBox : MonoBehaviour
{
[Tooltip("Name used to reference this element from Lua (max 24 chars).")]
[SerializeField] private string elementName = "box";
[Tooltip("Fill color for the box.")]
[SerializeField] private Color boxColor = Color.black;
[Tooltip("Whether this element is visible when the scene first loads.")]
[SerializeField] private bool startVisible = true;
/// <summary>Element name for Lua access.</summary>
public string ElementName => elementName;
/// <summary>Box fill color (RGB, alpha ignored).</summary>
public Color BoxColor => boxColor;
/// <summary>Initial visibility flag.</summary>
public bool StartVisible => startVisible;
}
}