feat(chat): port retail client command families
Expand the typed client-command boundary across travel, character queries, local UI and layout controls, AFK and consent, emotes, friends, squelch and filters, and fill-components. Preserve retail packet layouts and queue ownership, import the confirmation dialog, and keep authoritative social state in Core. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5a45a7ac7f
commit
9ea579bdd0
47 changed files with 6659 additions and 99 deletions
|
|
@ -8,6 +8,17 @@ namespace AcDream.App.Tests.UI;
|
|||
|
||||
public class UiTextTests
|
||||
{
|
||||
[Fact]
|
||||
public void WrapWords_UsesMeasuredWidthAndPreservesParagraphs()
|
||||
{
|
||||
IReadOnlyList<string> lines = UiText.WrapWords(
|
||||
"one two three\nfour",
|
||||
text => text.Length * 10f,
|
||||
maximumWidth: 75f);
|
||||
|
||||
Assert.Equal(["one two", "three", "four"], lines);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ClampScroll_PinsToZero_WhenContentFitsView()
|
||||
{
|
||||
|
|
@ -142,6 +153,28 @@ public class UiTextTests
|
|||
Assert.Equal(new UiText.Pos(1, 8), e2);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WrapWords_PreservesNewlinesAndWrapsAtSpaces()
|
||||
{
|
||||
IReadOnlyList<string> lines = UiText.WrapWords(
|
||||
"one two three\nfour",
|
||||
static text => text.Length,
|
||||
maximumWidth: 7f);
|
||||
|
||||
Assert.Equal(["one two", "three", "four"], lines);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WrapWords_SplitsAnOverWidthWordAtCharacterBoundaries()
|
||||
{
|
||||
IReadOnlyList<string> lines = UiText.WrapWords(
|
||||
"go abcdef",
|
||||
static text => text.Length,
|
||||
maximumWidth: 5f);
|
||||
|
||||
Assert.Equal(["go ab", "cdef"], lines);
|
||||
}
|
||||
|
||||
// ── VOffset: vertical positioning for single-line mode ───────────────────
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue