Opened 8 years ago

Last modified 2 years ago

#4252 closed defect

Dynamic chat label resizing — at Version 1

Reported by: elexis Owned by:
Priority: Should Have Milestone: Alpha 26
Component: UI – In-game Keywords: simple
Cc: Patch:

Description (last modified by Vladislav Belov)

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.

Change History (3)

by elexis, 8 years ago

Attachment: addressee_size_issue.jpg added

This is how it would look if we were just to follow hardcoded sizes that are compatible with long-strings.

by elexis, 8 years ago

comment:1 by Vladislav Belov, 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.

Note: See TracTickets for help on using tickets.