feat(mosstank): add VTank-style automation PoC

This commit is contained in:
Erik 2026-08-27 18:57:21 +02:00
parent f6fe0f2a4f
commit 4e6e9bc9d9
212 changed files with 49462 additions and 416 deletions

View file

@ -110,6 +110,13 @@ public sealed class UiField : UiElement
public Action<string>? OnSubmit { get; set; }
public Action? OnFocusGained { get; set; }
public Action<string>? OnFocusLost { get; set; }
/// <summary>
/// Live text mutation callback used by retained plugin markup. This is
/// deliberately separate from submit/focus-loss: editors need their
/// binding model to track typing so an adjacent button can consume the
/// current value without reaching into the widget tree.
/// </summary>
public Action<string>? OnTextChanged { get; set; }
private string _textValue = "";
@ -127,8 +134,11 @@ public sealed class UiField : UiElement
get => _textValue;
set
{
if (string.Equals(_textValue, value, StringComparison.Ordinal))
return;
_textValue = value;
_textVersion++;
OnTextChanged?.Invoke(value);
}
}