How to multiply a widget according to number of controllers

I am currently doing a game which is 4 people are allowed to play on the same console.
I am wondering how do I multiply the widget same to the number of controllers plugged in. Like 3 controllers, there will be 3 'Press X to play* on the screen, something like that

Widget: http://i.imgur.com/1idEvR1.jpg

How I draw my widget in My HUD: http://i.imgur.com/K0yva9o.png

How the widget Look like in game: http://i.imgur.com/rvNbM35.jpg

i think is the same widget you dont need create more widget for player

If you have 3 players, you have 3 PlayerControllers, right?

So you can use “Get All Actors of Class”, choose the PlayerController class and use the returning array.

Make a for each loop and in every iteration, you create a new widget of that “Press X Button” thing and add it as a child to the widget that should hold them. For example a horizontal box, so that they are right to each other. But that’s up to you.

Since you are adding them in line, you can create a reference to a PlayerController in that widget and when creating them, you pass them the Array element of the for each loop.

So you can check IN the widget which PlayerController pressed the X key, or which should press the X key.

im trying to do a lan game menu for a project. Which will allow 4 players to play on the same console

How do you add a widget to a existing widget?

me i add other just like that

doesnt that just add it to the screen? I dont think it just add to a existing widget. What I want is that 4 people can control 4 different widget at the same screen at the same time

example:


Like controlling their individual ship/weapon wheel.

I need to finish the 4.7.x patch first. Can’t show you pictures.

A horizontalbox can have childs. And if you create a new widget (like rjvm showed you), you just add it to the viewport AND add it as a child to the horizontalbox.

Since you are doing this inside of your main widget, you can get the horizontalbox like a variable on the left side of the graph and i guess somewhate call “add child” or something like that.

Remember i just took the horizontalbox as an example. It all depens on your setup.

ok thanks!