Opened 4 years ago

Last modified 15 months ago

#4252 new defect

Dynamic chat label resizing

Reported by: elexis Owned by:
Priority: Should Have Milestone: Backlog
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.

Attachments (2)

addressee_size_issue.jpg (496.8 KB) - added by elexis 4 years ago.
This is how it would look if we were just to follow hardcoded sizes that are compatible with long-strings.
chat_window_stupid_resize_v1.patch (1.5 KB) - added by elexis 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by elexis

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.

Changed 4 years ago by elexis

comment:1 Changed 3 years ago by Vladislav Belov

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 Changed 3 years ago by elexis

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 Changed 15 months ago by Imarok

Component: UI & SimulationIn-game UI

Move tickets to In-game UI as UI & Simulation got some sub components.

Note: See TracTickets for help on using tickets.