Skip to content

feat(ui_input): support multi-line text input from scenes#743

Open
robtfm wants to merge 1 commit intomainfrom
feat/ui-input-multiline
Open

feat(ui_input): support multi-line text input from scenes#743
robtfm wants to merge 1 commit intomainfrom
feat/ui-input-multiline

Conversation

@robtfm
Copy link
Copy Markdown
Collaborator

@robtfm robtfm commented Apr 27, 2026

Summary

  • Threads the new multi_line flag from PBUiInput (feat(ui_input): add multi_line flag to PBUiInput protocol#394) through to TextEntry. When true the text input becomes a multi-line textarea.
  • Bumps bevy_simple_text_input (robtfm/bevy_simple_text_input branch 0.16) to:
    • Flip Enter/Shift+Enter bindings: in multi-line mode plain Enter inserts a newline and Shift+Enter / NumpadEnter submits.
    • Drop the active selection on submit so a held Shift modifier doesn't leave a stale cursor anchor on a buffer that just shrank — cosmic-text was panicking trying to shape that anchor.
    • Fix a cursor-clamp off-by-one (clamp(0, lines.len())min(lines.len() - 1)) that allowed cursor.line == lines.len() through, which cosmic-text rejects with shape_until_cursor invalid cursor.

🤖 Generated with Claude Code

Adds the new optional `multi_line` flag from `PBUiInput` (decentraland/protocol#394)
and threads it through to `TextEntry`. When true the text input behaves
as a multi-line textarea: plain Enter inserts a newline; Shift+Enter or
NumpadEnter submits.

Also bumps `bevy_simple_text_input` (robtfm/bevy_simple_text_input branch
0.16) to pick up the matching binding flip and a cursor-clamp fix that
prevented panics when the buffer shrank past the cursor's line.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant