-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add callbacks to text selection events of TextBox #5366
Conversation
if (userEvent) OnImeComposition(newComposition, removeCount, addCount, oldStart != selectionStart || oldEnd != selectionEnd); | ||
|
||
onTextSelectionChanged(newSelectionLength > 0 ? TextSelectionType.Character : TextSelectionType.Deselect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is valid, as IME input is quite different from regular text input. I'd rather add newSelectionLength
(or textSelected
) to OnImeComposition
.
With the osu!-side PR, this currently produces sounds for both OnImeComposition
and OnTextSelectionChanged
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, I'll re-check the behaviour with IME.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has been removed.
Co-authored-by: Susko3 <Susko3@protonmail.com>
Will be used for adding audio feedback to text selection in lazer