-
Notifications
You must be signed in to change notification settings - Fork 436
MVP for Multi-Line Textbox #6564
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
base: master
Are you sure you want to change the base?
Conversation
This will close #1618 (can't edit OP). |
This looks pretty interesting on a quick glimpse. Without diving in details, has there been any exploration or intention to merge this together with I'm also curious to know what sparked this much effort out of nowhere, has this been discussed somewhere else or just pushed out like this? |
The
For the most part just boredom, though I know that at some point I'll need a multiline text box for my typescript port of osu-framework, so I figured I might as well just make it for osu-framework first since it seems like a useful component to have.
There's a brief exchange on discord from earlier today but nothing besides that. |
Couple more thoughts on the whole thing It'd probably make sense to add entries for the following 2 actions to
I think naming of |
A MVP implementation for a multi-line text box. This is still a bit messy and incomplete, but I wanted to see if this approach is generally a step in the right direction before going further.
I opted for splitting the text into words & putting them as individual
DrawableSprite
s into aFillFlowContainer
for the layout, and compute a small index from that to help with converting between draw-position and text-positions whenever the layout gets recalculated.I also attempted to extract a
TextSelection
class from the selection handling inTextBox
, so that the selection behavior could be shared between the classes without relying on inheritance.There's still a couple bugs that I'm aware of
LineInfo
calculation leading to null items in the Lines array2025-04-10.03-34-38.mp4
Closes #1618