Whats the best way to make a drop down menu? I kinda think this should be a GUI attribute. Any help?
Bill
Whats the best way to make a drop down menu? I kinda think this should be a GUI attribute. Any help?
Bill
The popup menu for paths in the file requester in Fractscape is basically like a drop-down menu. I did it like this:
// Path list popup -- done last so it's drawn on top of other stuff
if (showPopup) {
GUI.Box (Rect(popupRect.x, popupRect.y, popupRect.width, 27*pathList.Length), "", popupBoxStyle);
selectedPath = GUI.SelectionGrid (Rect(popupRect.x+4, popupRect.y+4, popupRect.width-8, 27*pathList.Length-8), selectedPath, pathList, 1, listStyle);
}
Hopefully that makes some sense out of context. pathList is a string[ ], and the others should be obvious.
–Eric