Game Development Community

Quck Question - Removing GuiPopUpMenuCtrl options.

by Jacob S. · in Torque 3D Professional · 02/22/2010 (11:12 am) · 2 replies

Quick question, I've been looking off and on for 3 days or so in the forums here for a way to remove a value from a GuiPopUpMenuCtrl after the first selection (to get rid of a "Please Select.." Option). I would think that there is a way to run a function from the ::OnSelect method that would remove the value.

Knowing how these things go there is probably a simple Torque Script command to do it and I'm just not finding it.

Thanks.

#1
02/22/2010 (1:48 pm)
I believe what your looking for is "PopupMenuName.clearEntry(S32 entry);". We use it plenty like this..

%id = PopupMenuName.findText( NameOfEntry );
PopupMenuName.clearEntry( %id );
#2
02/23/2010 (9:13 am)
Thanks that's exactly what I'm looking for.