#4252 closed defect (fixed)
Dynamic chat label resizing
Reported by: | elexis | Owned by: | bb |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 26 |
Component: | UI – In-game | Keywords: | simple |
Cc: | Patch: | phab:D2623 |
Description (last modified by )
The labels "To:" and "Text:" in the chat window are properly formatted in english, but some languages need more space than had been allocated when the strings and labels were introduced in r17771.
Just using the maximum size to fit all language yields ugly results in enlgish, see screenshot:
A better approach were to resize the label and text boxes dependent on the actual length.
There is Engine.GetTextWidth()
that should be able to accomplish that.
Attachments (2)
Change History (10)
by , 8 years ago
Attachment: | addressee_size_issue.jpg added |
---|
by , 8 years ago
Attachment: | chat_window_stupid_resize_v1.patch added |
---|
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
I think it's easy to make the CText/CInput to be autoresized, but there's the another problem: if the text width intersects with the input width, then we need to move and resize the input too. So, or we make it on JS part, which should be easy too, but it needs to repeat for any such case; or we make something like view (rowview, cellview, tableview) which autoaligns all elements by their sizes and size priorities.
comment:2 by , 7 years ago
Such a GUI object would be versatile and useful, but we should gather some actual use cases before implementing it for only the chat window.
I could imagine the "more options" window of the gamesetup using such an aligned view, but the existing view doesn't really need it since the labels support 2 lines, providing enough space.
comment:3 by , 5 years ago
Component: | UI & Simulation → In-game UI |
---|
Move tickets to In-game UI
as UI & Simulation
got some sub components.
comment:4 by , 3 years ago
Keywords: | simple removed |
---|---|
severity: | → simple |
comment:5 by , 3 years ago
Keywords: | simple added |
---|
comment:6 by , 3 years ago
Description: | modified (diff) |
---|---|
Patch: | → phab:D2623 |
comment:8 by , 2 years ago
Milestone: | Backlog → Alpha 26 |
---|
This is how it would look if we were just to follow hardcoded sizes that are compatible with long-strings.