How to align messages in an in-game messaging app?

Hello :wave: I’m trying to create an in-game messaging app. I encountered a problem when I wanted to align the incoming messages to the left and the outgoing messages to the right.

messagingInterface

I’m currently using an UiListLayout to list the messages.

What would be the best way to align the green messages to the left and the blue messages to the right?

Here’s my file structure:
image

Any help is appreciated :star_struck:

1 Like

I would probably have a frame that goes across the entire x-axis of your message frame, then align the message within that frame depending on who’s sending it.

1 Like

You can align messages on the right by setting the anchor point to 1, 0 and the scale position to 1, 0, 0, 0. This makes the frame transform relative to the top right of the frame you’re working in.

In this case, it seems like you should do this for MessageContentLabel.