Author Topic: GUIPopupMenuProfile Help  (Read 2206 times)

How do I make it so when you press the popup button it gives you a list of things to choose from and when you choose it, it changes the text to it?


So like a dropdown menu?

So like a dropdown menu?
Yup. But the GUIPopupMenuProfile shows some random objects.

Yup. But the GUIPopupMenuProfile shows some random objects.

What are you trying to make it display?

for(%i=0;%i<datablockGroup.getCount();%i++)
{
%obj = datablockGroup.getObject(%i);
if(%obj.getClassName() $= "fxDTSBrickData")
{
GUINAME.add(%obj.uiName);
}
}

creates a dropdown menu of all the brick UI names

for(%i=0;%i<datablockGroup.getCount();%i++)
{
%obj = datablockGroup.getObject(%i);
if(%obj.getClassName() $= "fxDTSBrickData")
{
GUINAME.add(%obj.uiName);
}
}

creates a dropdown menu of all the brick UI names

Is that the code I gave you? B)

Is that the code I gave you? B)
Plornt provided it actually

for(%i=0;%i<datablockGroup.getCount();%i++)
{
%obj = datablockGroup.getObject(%i);
if(%obj.getClassName() $= "fxDTSBrickData")
{
GUINAME.add(%obj.uiName);
}
}

creates a dropdown menu of all the brick UI names

FYI that'll only work for the server host. Try it on a dedicated server and you'll see what I mean.

FYI that'll only work for the server host. Try it on a dedicated server and you'll see what I mean.
I see, funny, thats what I needed it to work for in the first place :P, how would a client sided one look?

there are addrow and removerow commands i believe.

Code: [Select]
clear();
add();
Solved.

Code: [Select]
clear();
add();
Solved.
More in depth:

To add a row to a list first define the list:
Code: [Select]
%list = CONTROL_NAME;
Now add to it:
Code: [Select]
%list.addRow(ROW_NUMBER, "WORDS");
Now if you ever want to clear the list do:
Code: [Select]
%list.clear();

For more go HERE.