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

SUGGESTION, not an Issue: Regex and application of newlines to script and common #307

Open
elayes211 opened this issue Dec 20, 2022 · 2 comments

Comments

@elayes211
Copy link

elayes211 commented Dec 20, 2022

Text Editting Suggestion

S and V are really flexible and work with the custom newlines.

I suggest adding a regex and some logic to reapply newlines, when none are found!

I can help with the generation of the regex.

I already own one, let me know if you want me to put it here.

It is not optimized but it works without cutting the [VAR ..............] variables of the text

Thank you for reading,
You can lock it anytime,
I wont be insulted at all!

Thank you for this awesome app,
George!

@kwsch
Copy link
Owner

kwsch commented Dec 20, 2022

String measuring is not something the editor currently does. The text editor is kinda dumb, in that whatever you give it is whatever it uses.

Regex isn't the solution; a font-specific and variable-aware measurer is what is needed. Someone would have to document heuristics, like:

  1. how wide in pixels the textbox is
  2. worst case scenario strings for specific variables (or generally, worst for any variable)

A decent GUI implementation would have multiple modes of linebreak updating:

  1. manual (off)
  2. checked (indicate where text overflows)
  3. auto (prepend words that overflow)

@elayes211
Copy link
Author

elayes211 commented Dec 20, 2022

Thank you for the valuable info/investigation/analysis.

One precious, yet simple info is the following:

The text that appears on the top of the heads of NPCs, the short message they give before you talk to them, accepts newlines.

In PLA it had to be in our row, SV is more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants