Aligning separate widgets to create a "spreadsheet" effect? (How to align items in a server browser UI)

Hello everyone,

I’m trying to create a server browser UI for my game, and wanted it to be similar to the one in Source Engine games, which looks like this:
HL2_Serverlist

The UI is like a spreadsheet with columns and rows, to neatly display each bit of information. Each field starts (and ends, not flowing into the next field) where it should.

For my game, I already have a basic UI for the browser.


I originally thought of maybe using vertical rows, with the first being the field name, and then below placing a generic “text box” for each information type, then covering the entire row with an invisible set of boxes to make it seem like a single element. Unfortunately, this overengineered approach did not work, as the field names and box are on separate layers, and trying to move it around would only lead to disaster.

Instead, right now, what I have is this:


It’s a copy-paste of the header of the server browser, with each field having the exact separation it should. Sadly, this does not work either, even though it is one element, which does simplify things, everything shows out of alignment.

To be perfectly frank, I’m out of good ideas, all that I have left are hacky implementations. Of course, an engine as old and polished as Unreal should have a simple way to solve this, after all, surely this has been an issue that someone has had to deal before at some point, so before I go ahead and start making the worst UI setup anyone has ever seen, I thought of reaching out to this forum for a sanity check. Maybe there’s a really simple approach that I’ve just failed to find.

I greatly appreciate each reply. Thank you.

Your original approach is the right approach. It is valid not just in Unreal engine but applicable to pretty much any interface development.

I would suggest you using a list view in umg and an insert template which contains the elements you described.

That way you would be able to make sorting also easier. Basically you can select the all widgets in container parent with all children. Stip the column of choice and sort them with latency, capacity etc.

I don’t think your first approach neither wrong or overengineered, it is the correct way of doing things. In a list or a scroll view you can additionally lazy load additional rows for player upon reaching the end so that the query is not something player waits a lot. Since they are going to query/ping each server eventually for their status. If you do the alignments right and use a grid or horizontal box for each entry it would be working very nicely.

PS : You should adjust your insert template (row) according to your UI design. Knowing max and min character needs for each row. Additionally for space management you can use emphasis or marquee to display text. If you keep the rules intact it would not create additional headaches for you in the future with alıgnment and so on. It is also possible to make dynamic fonts with bp to fit text still I wouldn’t recommend that but use an “overflow policy”
image
Let us know more details if you can’t make it work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.