In the server browser most server descriptions have their text centered, but if a description causes a word-wrap the centering will break.
I think this could be fixed quickly by applying the horizontal_align style and setting it to 'center'.
Fixing it would make server descriptions more consistent
Examples:
Server description with word-wrap
Server description without word-wrap
[0.17.72] Server description and word wrapping
Moderator: ickputzdirwech
- SimonFlapse
- Burner Inserter
- Posts: 17
- Joined: Thu Feb 28, 2019 1:20 pm
- Contact:
Re: [0.17.72] Server description and word wrapping
IMHO, this behaves exactly as I would expect it to. Consider having a server description of 5 full text lines + a couple of words. In this case, the last couple of words hanging centered would look just weird.
I would not mind having all server descriptions be ragged right, even single lines. But centering single line descriptions is fine.
I would not mind having all server descriptions be ragged right, even single lines. But centering single line descriptions is fine.
Re: [0.17.72] Server description and word wrapping
Thanks for the report. That's how centering works for text boxes in Factorio. As far as I know we don't support the style of horizontal text-alignment you're describing when multi-line text is involved.
If you want to get ahold of me I'm almost always on Discord.
- SimonFlapse
- Burner Inserter
- Posts: 17
- Joined: Thu Feb 28, 2019 1:20 pm
- Contact:
Re: [0.17.72] Server description and word wrapping
I've managed to do it in text boxes with horizontal_align: 'center'
The string "This section is supposed to be filled out on a per map basis, but now it is word wrapping." has been word wrapped but is still centered. If you paste the same into the server description it will look like my before mentioned example with word wrap.
Furthermore the centering in the server description only works when no lines have been word wrapped.
So the following string in my example in this replay: "If you're seeing this message, ping the admin team to get/na description added for this map (20 coin reward)" would be left aligned now. Even though I've manually added a newline
Example:
Edit:
I had not noticed that the entire description is a single label, and not a text box. I still think it looks very weird.
I can still center the text in a label using the horizontal_align: 'center'. No word wrap though
The string "This section is supposed to be filled out on a per map basis, but now it is word wrapping." has been word wrapped but is still centered. If you paste the same into the server description it will look like my before mentioned example with word wrap.
Furthermore the centering in the server description only works when no lines have been word wrapped.
So the following string in my example in this replay: "If you're seeing this message, ping the admin team to get/na description added for this map (20 coin reward)" would be left aligned now. Even though I've manually added a newline
Example:
Edit:
I had not noticed that the entire description is a single label, and not a text box. I still think it looks very weird.
I can still center the text in a label using the horizontal_align: 'center'. No word wrap though