Create instances of predesigned guis


24-03-2009 22:19:20


I am currently working on my multiplayer features, namely the screen where you wait for other players to join your game. As I have different amounts of slots depending on the users settings, I would need to create different counts of slots for players in the gui, e.g.

1. Name: ____ Skill: __ [Kick]
2. Name: ____ Skill: __ [Kick]
3. Name: ____ Skill: __ [Kick]
4. Name: ____ Skill: __ [Kick]

[Start Game]

The best way for me would be if there was a way to copy existing gui elements like a panel, including all children, so I could easily extend my form by the amount of slots needed. Is there a way to do this in MyGUI?


24-03-2009 22:38:07

You can't copy widgets in MyGUI, but I suggest you do next thing (this is what we usually do):
create one layout:
Name: ____ Skill: __ [Kick]
and load it several times.


29-03-2009 02:20:24

thanks, but how can i add the widgets to the same window? is there a way? I would need the panels aligned below each other in the same widget.