Back color configurable, added fps counter checkbox
This commit is contained in:
@@ -594,6 +594,10 @@ namespace SplashEdit.EditorCode
|
||||
new GUIContent("Memory Overlay", "Show heap/RAM usage bar at top-right during gameplay"),
|
||||
SplashSettings.MemoryOverlay);
|
||||
|
||||
SplashSettings.FpsOverlay = EditorGUILayout.Toggle(
|
||||
new GUIContent("FPS Overlay", "Show an FPS counter at top-left during gameplay"),
|
||||
SplashSettings.FpsOverlay);
|
||||
|
||||
// Serial port (only for Real Hardware)
|
||||
if (SplashSettings.Target == BuildTarget.RealHardware)
|
||||
{
|
||||
@@ -1187,6 +1191,9 @@ namespace SplashEdit.EditorCode
|
||||
|
||||
if (SplashSettings.MemoryOverlay)
|
||||
buildArg += " MEMOVERLAY=1";
|
||||
|
||||
if (SplashSettings.FpsOverlay)
|
||||
buildArg += " FPSOVERLAY=1";
|
||||
|
||||
int jobCount = Math.Max(1, SystemInfo.processorCount - 1);
|
||||
string cleanPrefix = SplashSettings.CleanBuild ? "make clean && " : "";
|
||||
|
||||
@@ -136,6 +136,19 @@ namespace SplashEdit.EditorCode
|
||||
set => EditorPrefs.SetBool(Prefix + "MemoryOverlay", value);
|
||||
}
|
||||
|
||||
|
||||
// --- FPS Overlay ---
|
||||
/// <summary>
|
||||
/// When enabled, compiles the runtime with an FPS counter
|
||||
/// and text overlay at the top-left corner of the screen.
|
||||
/// Passes FPSOVERLAY=1 to the native Makefile.
|
||||
/// </summary>
|
||||
public static bool FpsOverlay
|
||||
{
|
||||
get => EditorPrefs.GetBool(Prefix + "FpsOverlay", false);
|
||||
set => EditorPrefs.SetBool(Prefix + "FpsOverlay", value);
|
||||
}
|
||||
|
||||
// --- Export settings ---
|
||||
public static float DefaultGTEScaling
|
||||
{
|
||||
|
||||
@@ -103,16 +103,19 @@ namespace SplashEdit.EditorCode
|
||||
|
||||
private void DrawFogSection(PSXSceneExporter exporter)
|
||||
{
|
||||
showFog = EditorGUILayout.Foldout(showFog, "Fog", true, PSXEditorStyles.FoldoutHeader);
|
||||
showFog = EditorGUILayout.Foldout(showFog, "Fog & Background", true, PSXEditorStyles.FoldoutHeader);
|
||||
if (!showFog) return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
EditorGUILayout.PropertyField(fogEnabledProp, new GUIContent("Enabled"));
|
||||
EditorGUILayout.PropertyField(fogColorProp, new GUIContent("Background Color",
|
||||
"Background clear color. Also used as the fog blend target when fog is enabled."));
|
||||
|
||||
EditorGUILayout.PropertyField(fogEnabledProp, new GUIContent("Distance Fog"));
|
||||
|
||||
if (fogEnabledProp.boolValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(fogColorProp, new GUIContent("Color"));
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(fogDensityProp, new GUIContent("Density"));
|
||||
|
||||
float gteScale = exporter.GTEScaling;
|
||||
@@ -125,6 +128,7 @@ namespace SplashEdit.EditorCode
|
||||
$"<color=#aaaaaa>GTE range: {fogNearUnity:F1} - {fogFarUnity:F1} units | " +
|
||||
$"{8000f / (density * 3f):F0} - {8000f / density:F0} SZ</color>",
|
||||
PSXEditorStyles.RichLabel);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
Reference in New Issue
Block a user