Page 1 of 1

[Rseding91] [0.15.28] Mod settings with long values

Posted: Thu Jul 06, 2017 4:55 pm
by theRustyKnife
If you have a string-setting that specifies allowed_values (a dropdown), and one of those values is very long, the entire GUI will stretch to the length of that value.
This can cause the GUI to go off-screen and make it hard to change anything, not to mention it looks ugly.

The proposed solution would be to trim the long values to some maximum width and put '...' at the end. Also maybe show the entire value (wrapped) as a hover tooltip, just so there is some way for the player to see the whole thing.

Thanks TRK

Re: [0.15.28] Mod settings with long values

Posted: Thu Jul 06, 2017 5:06 pm
by Optera
theRustyKnife wrote:If you have a string-setting that specifies allowed_values (a dropdown), and one of those values is very long, the entire GUI will stretch to the length of that value.
This can cause the GUI to go off-screen and make it hard to change anything, not to mention it looks ugly.

The proposed solution would be to trim the long values to some maximum width and put '...' at the end. Also maybe show the entire value (wrapped) as a hover tooltip, just so there is some way for the player to see the whole thing.

Thanks TRK
You are in a world of pain if you naively abbreviate things by trunkating words with "..." as you do in English or German.
In Arabic and similar languages words can get larger if you remove characters. Apple stumbled across this once in notifications on iOS if I recall correctly.

The only solution is to work with translators and get them to write text that fits in a certain length.
As mod author that translator is you. So pick meaningful short descriptions and save long winding explanations for the mouse over help.

Re: [0.15.28] Mod settings with long values

Posted: Thu Jul 06, 2017 5:31 pm
by theRustyKnife
Optera wrote:
theRustyKnife wrote:If you have a string-setting that specifies allowed_values (a dropdown), and one of those values is very long, the entire GUI will stretch to the length of that value.
This can cause the GUI to go off-screen and make it hard to change anything, not to mention it looks ugly.

The proposed solution would be to trim the long values to some maximum width and put '...' at the end. Also maybe show the entire value (wrapped) as a hover tooltip, just so there is some way for the player to see the whole thing.

Thanks TRK
You are in a world of pain if you naively abbreviate things by trunkating words with "..." as you do in English or German.
In Arabic and similar languages words can get larger if you remove characters. Apple stumbled across this once in notifications on iOS if I recall correctly.

The only solution is to work with translators and get them to write text that fits in a certain length.
As mod author that translator is you. So pick meaningful short descriptions and save long winding explanations for the mouse over help.
Yeah, I guess you're right. To be perfectly honest, I wanted this mostly to be able to better hide some of my hacks... I don't actually have such long options and, as you said, probably shouldn't have either.
Still, at least some wrapping or something might be nice, considering the string settings without allowed_values only get a tiny input field and it doesn't seem to be a problem.

Here's a random thought: May there ever be the problem you mentioned if the text is cut off between words? (Are there languages that don't have words in written form?)

Either way, this is only a very minor issue, so I wouldn't particularly mind it getting put off for now.

Re: [Rseding91] [0.15.28] Mod settings with long values

Posted: Thu Jul 06, 2017 5:38 pm
by Rseding91
Thanks for the report. As others have said the real "fix" is to just not use strings that are too long.

I'll artificially limit the visual width of the dropdown so it doesn't make the GUI go crazy but it's probably not going to look nice.

Re: [Rseding91] [0.15.28] Mod settings with long values

Posted: Fri Jul 07, 2017 4:11 pm
by Rseding91
I've limited the width for now. It looks quite ugly :P

We're going to be doing a lot of GUI re-work in 0.16 so I'll do a full fix then.