Hi Seth,
No, I couldn't figure out a way to *remove* elements, but I can add them. ( For removing, I'm just re-naming the button to "-remove-". It Is possible to remove them, however the next button you add to that sub menu will appear a space below ( rather than up at the position it should be ). It is possible to hard-set the location of the buttons, so I suppose you could move all of them up yourself which wouldn't be amazingly hard to do ( and I may do in future versions ), but for now, no, as far as I could see, there was no way to remove buttons properly.
As for adding them, that was easy, you just need a unique button name for the menu you wish to add. So :
Code:
MultiListButton editB;
MultiList l;
l = gui.addMultiList("myList",10,40,130,15);
editB = l.add("test2",3);
editB.setLabel("Edit");
then to create a new button within 'edit' you just type editB = l.add("buttonname",idthinggy);
That's how I'm doing it anyway.
As for a list of methods, there isn't any online, but from what I've discovered :
remove()
updateLocation(float x, float y);
add(String theName, int theValue);
close();
open();
and MultiListButton :
remove();
updateLocation(x,y); ( this is what I was using to relocate the buttons after removal )
add();
I think that's about it. Though I'm sure I'm missing a bit.
I've got a version of my menu online, it's an old one and I've since fixed quite a few of the bugs contained within (like the -remove- bug, that was a problem with my ArrayList that was holding the Spheres ), just make sure you read the blog entry so you don't break it
I do think the most needed feature of the MultiList would be when an element is removed from the menu, all the other elements in that list move up to fill in the gap. Shouldn't be too hard to do, just go through and update the location for all sub buttons after that one x(width of the buttons) places. Suppose I could hard-code it myself. I might try it tonight.
http://www.tenfiftyfour.com/aAVis/?p=18