Skip to content
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

Multiline text fields? #158

Open
nullium21 opened this issue Apr 18, 2022 · 1 comment
Open

Multiline text fields? #158

nullium21 opened this issue Apr 18, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nullium21
Copy link

Is your feature request related to a problem? Please describe.
Was trying to make a simple script editor UI, but didn't find any text field widget with multi-line text support (line breaks).

Describe the solution you'd like
Either a WTextArea with multi-line editing and stuff, or that functionality in WTextField. From what I can see, the latter would involve at least a int maxLines field with a setter and a getter, some sort of line start -> offset map to be used in most methods using scrollOffset or cursor position, and some small changes in render* functions and event handlers.

Describe alternatives you've considered
Trying to write this myself.

Additional context
By, essentially, copying-and-pasting WTextField.java into another file and editing out the forced height of 20px I got it to render a box, but it looks like some more sophisticated adjustments need to be made to actually allow using those as multiline text inputs.

@nullium21 nullium21 added the enhancement New feature or request label Apr 18, 2022
@Juuxel Juuxel added the help wanted Extra attention is needed label Apr 21, 2022
@Juuxel
Copy link
Member

Juuxel commented Apr 21, 2022

Text editing - especially multiline - is notoriously painful. For that reason, I don't have the energy to create a multiline text area for LibGui. If someone wants to contribute such a widget themself, I'll definitely merge that PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants