I Love Textboxes, You Love Textboxes: We Made Changes to 'Em

First off, even before this update, anyone could just type them in a notepad and then paste them in. They would then be able to copy from that text editor and still have the answers.

Secondly, you could judge the time it takes for them to answer AND how many characters they type per second (if they paste it in, the characters per second would spike.

1 Like

oh my god… thank you.

As said above access to the copy and past API and ability to color parts of textlabels etc would be awesome!

1 Like

This man is ahead of his time.

Seriously though, thank you for these improvements! Could we perhaps get finer control over textwrapping and scaling for textlabels/textboxes next?

3 Likes

Couldn’t you always copy/paste in TextBox’s? I’ve always copy and pasted text into the Text property of a TextBox without any problems, unless I’m missing something here?

You weren’t able to select stuff in text boxes before this feature was introduced. Since you couldn’t select stuff, you weren’t able to copy stuff from text boxes, either.

1 Like

One small thing I don’t like about this update is the lack of control over the selection styling. I have a custom font rendering system in my game which generates text from a spritesheet and overlays it on top of TextLabels and TextBoxes, and hides the regular text by setting TextTransparency to 1.

Normally it looks like this:
image

Unfortunately, text selection doesn’t respect transparency, so the original text shows up behind the custom text:
image

If there was more control over how selections look visually, this would be a perfect update!

(inevitable question faq: yes, it supports unicode and falls back to a regular font for unsupported characters, no, regular roblox fonts don’t fit in well enough with the game theme :p)

7 Likes

What about just positioning the real textbox off-screen? I’ve done a fake textbox before (video), and I think I even set Visible to false for the TextBox itself. To be fair, I also had to use multiple TextLabels to support switching the color mid-way through the text.

EDIT: I didn’t use a custom font in my project, I’m just rendering multiple TextLabels with different colors. Rendering a custom font instead is just another use case.

If you do want to support selection and copy/paste, you can just sync your fake and the real (hidden) textbox, read CursorPosition/SelectionStart and even set them by detecting mouse click/drag. Could even add (ctrl+)shift+arrow selection, ctrl+del word deletion, …

EDIT: I realize I haven’t actually mentioned how my system technically works, so an overview:

Extra info
  • Clicking the commandline calls :CaptureFocus() on the real hidden TextBox
  • I listen to .Changed for Text to see when the user types (or even pastes!) something
  • Afterwards I actually set .Text to an empty string, to properly detect later what’s typed/pasted
  • The “real” input is stored in an internal string, which I then render however I want
  • I actually have a custom cursor, which also gets rendered in the right position (^ same routine)
    This was back in the day when there was no CursorPosition, even though TextBoxes had a cursor the user could move (by clicking or left/right arrow)
  • Use UserInputService.InputBegan (if TextBox is focused) to listen for special keybinds
    • Backspace, left/right arrows for cursor, up/down arrows and LeftAlt for intellisense stuff
    • no idea why I didn’t listen for TextBox.InputBegan, might’ve been buggy for some reason?
      Oh I remember: I allowed scrolling through (and dragging) the terminal content, and I also allowed scrolling through suggestions when they were visible. Grouped to prevent overlap.

Before I “paused” the project, I was thinking about how to best do this on mobile. I don’t think I can actually detect “keypresses”, but to be fair, mobile wasn’t really my big focus at that point. I did have the idea of “create a mobile-friendly touch UI” in mind, for quick admin actions. Nothing over the top.

Quite a fun trip down memory lane. I might actually try recreating it with the ability to copy stuff, just for fun. And make it more dev-friendly, as it’s now hard embedded in my project and en-strangled with other code.

10 Likes

A post was merged into an existing topic: Positive Feedback For Textboxes Update

2 posts were merged into an existing topic: Positive Feedback For Textboxes Update

Yea, since I’m specifically working on making my game work on mobile, I don’t think that would work entirely :stuck_out_tongue:

I haven’t used mobile roblox, so I don’t know how the keyboard UI looks, let alone on different phone OSes. But you might still get away with completely hiding the TextBox.

1 Like

I hope you know that even without copy and pasting users would still be able to type using their keyboard a link into the URL bar. This doesn’t make anything less safe, quiet literally nothing has changed.

edit; for all this is a reply still getting used to devforum formatting, dunno how to quote xP

You make a selection of the statement you are wanting to reference, and it should bring up a button that says “Quote”.

1 Like

I’m still out here waiting for TextButton.borderRadius to be a thing. Would be so much easier than to create custom frames, make them image buttons, worry about border clarity. Too much headache. Thanks for the release. Will be using.

1 Like

This has actually been around for a while! It seemed kind of buggy though since it would keep deleting words after releasing control.

2 Likes

It’s been off and on for me, but usually it would either break copy/pasting or holding backspace wouldn’t work. Now that it does, though, it’s a really nice and much needed improvement to the chat.

Yes, I am aware that you could already type a link. Many scams have used it. However, copying and pasting makes these scams much easier. It does change things. If the link is 20 characters long, manually typing it would require going back and forth repeatedly. Copying and pasting allows that process to become instant. I was just wondering if there really was really anything that could be done about this other than just moderation. Could a game be reported for this? Would this violate the TOS?

I was really just curious.

*To quote, highlight text and press the aoute button.

2 posts were merged into an existing topic: Positive Feedback For Textboxes Update

Very nice!
Do you think we will ever have Text texturing?? It’s pretty irritating to make it a bit transparent to get it the texture view of its plate and using meshes

1 Like