Fix ADV config opacity and text lifetime

This commit is contained in:
gamer147
2026-07-28 12:21:32 -04:00
parent b7f67c8715
commit 77a4687f39
16 changed files with 275 additions and 96 deletions

View File

@@ -65,6 +65,7 @@ public sealed class GodotAdvHost : IHost
private long _advTextStartedMs;
private int _activeGlyphDelayMilliseconds = 50;
private int _messageGlyphDelayMilliseconds = 50;
private volatile int _messageWindowAlphaSetting;
private bool _advTextForceComplete;
private readonly Dictionary<int, AdvWaitIndicatorConfig> _waitIndicators = new();
private readonly object _messageSkipLock = new();
@@ -365,7 +366,13 @@ public sealed class GodotAdvHost : IHost
lock (_textLock) return _historyText.Values.OrderBy(batch => batch.LayoutSlot).ToArray();
}
public int MessageWindowAlphaSetting => 0;
public int MessageWindowAlphaSetting => _messageWindowAlphaSetting;
public void SetMessageWindowAlphaSetting(int value)
{
_messageWindowAlphaSetting = value;
_timeline?.Event("message-window-alpha", new() { ["value"] = value });
}
public void FillSurfaceRect(SurfaceRectFill fill)
{

View File

@@ -1244,7 +1244,8 @@ public partial class Main : Godot.Control
// Modal callback scripts composite their own full-screen UI while the enclosing ADV wait remains
// parked. Live layout text is a Godot overlay rather than part of the retained surface. During a
// raw-input callback, keep runs owned by that callback's script stack (STUDY -> MAMES) while hiding
// enclosing ADV runs that would otherwise leak above a nested screen such as HISTORY.
// enclosing ADV runs that would otherwise leak above a nested screen such as HISTORY. Native
// retained-glyph erases remove ordinary live runs through the host before this presentation pass.
foreach (var label in _advTextLabels) label.Visible = false;
if (_host.IsAdvPagePresentationSuspended) return;