Jump to content
Sign in to follow this  
zapat

multi instance controls - dinamism in UI?

Recommended Posts

I have a controlsGroup with images, texts and some buttons.

Now the number of the needed controlGroups is changing. Sometimes I need 2, sometimes I need 10 different instances, but the same class. (just like BIS does the unitInfo in the commandBar: same unitInfo class, but number of instances depends on the unit count)

Is it possible to add some dinamism to control creation (eg. a foor loop) upon dialog creation, or do I have to manually create goup1, grop2, ...group10, and make unused invisible?

Share this post


Link to post
Share on other sites

you should be able to do that, with the format command:

for [{_x=1},{_x<=10},{_x=_x+1}] do {
  _myDialog = createDialog format["group%1",_x];
};

Share this post


Link to post
Share on other sites

Lappihuan:I meant controls within a dialog/display. Thanks for the answer anyways.

Share this post


Link to post
Share on other sites

hmm, I haven't done much with dialogs until now. Iceman could probably help but he is somehow missing from the forums... have a dialog question for him too ^^

Edit:

How about depbo the UI data from the game and see how its done in there?

Edited by Lappihuan

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×