Skip to content

Copyable#6528

Open
Pok27 wants to merge 5 commits into
space-wizards:masterfrom
Pok27:Copyable
Open

Copyable#6528
Pok27 wants to merge 5 commits into
space-wizards:masterfrom
Pok27:Copyable

Conversation

@Pok27
Copy link
Copy Markdown
Contributor

@Pok27 Pok27 commented Apr 15, 2026

This PR adds a copy-selection layer for display-only text controls, so things like Label, RichTextLabel, and OutputPanel can support text selection and clipboard copy without each control re-implementing input and selection state logic by setting the Copyable attribute to true. The core of this is a new SelectableTextControl base class plus ISelectableTextLayout, which lets each control provide its own hit-testing / selection rendering while sharing the interaction behavior (UIClick / drag-select / TextCopy).

RichTextEntry now exposes layout/copy helpers that are used by RichTextLabel and OutputPanel, and TextEdit selection rendering has been slightly updated to follow the same approach, to ensure consistent behavior.

There is also a small fix in ClydeHeadless.cs: headless clipboard operations now store/retrieve text in-memory instead of always returning empty text. This is needed for integration test.

By default, the copy attribute is enabled only for OutputPanel, since the others have MouseFilterMode.Ignore by default. This can be changed, but it will require some UI fixes. This can be done in another PR.

copy

fix space-wizards/space-station-14#510

@PJB3005 PJB3005 added T: New Feature Type: New feature Priority: 3-Not Required A: UI Things like game screens, menus, and windows. labels May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: UI Things like game screens, menus, and windows. Priority: 3-Not Required T: New Feature Type: New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't select text inside chat

2 participants