If the optional p_ui tag is included in a parameter block descriptor, then it is followed by the user interface control specification. This tag
is followed by a variable list of arguments depending on the type of UI control specified. The first value following the p_ui tag is a control type identifier, which defines the number and type arguments which must follow.
Note: If a p_ui is supplied for a Tab<> parameter type and the control is not one of the list box types (see List Box Control Types), the table size should be fixed and supplied as a table_size argument (preceding the flags argument), and you should supply a set of dialog item ID's for each element in the table. See the example in the topic Spinner and Slider Controls and the topic Describing a Parameter Block.
The control types are identified by the following ControlType and ControlType2 enumerations:
- TYPE_SPINNER - The spinner control is used to provide input of values limited to a fixed numeric type. For example, the control may be
limited to the input of only positive integers. The input options are integer, float, universe (world space units), positive
integer, positive float, positive universe, and time. This control allows the user to increment or decrement a value by clicking
on the up or down arrows. The user may also click and drag on the arrows to interactively adjust the value. The Ctrl key may
be held to accelerate the value changing speed, while the Alt key may be held to decrease the value changing speed. See the
topic Spinner and Slider Controls for more information
- TYPE_SLIDER - A standard 3ds Max slider control. See the topic Spinner and Slider Controls for more information
- TYPE_RADIO - Radio buttons are used to provide the user with a single boolean choice, or when used in groups, to select among several
options. These are the standard Win32 radio button controls. Following the TYPE_RADIO, you must supply an integer count of the number of radio buttons in this group and then a list of dialog item IDs for each
button. A radio button can be used with TYPE_INT or TYPE_RADIOBTN_INDEX parameters. The value of the parameter defaults to the ordinal number of the radio button, starting at 0. You can optionally
supply a p_vals tag immediately following the p_ui section, which would be followed by a list of numbers, one for each radio button. These numbers will become the (non-ordinal)
parameter value corresponding to which button is set.
- TYPE_SINGLECHEKBOX - Check boxes are used to provide the user with a single boolean choice. This is the standard Win32 check box control. The
TYPE_SINGLECHEKBOX must be followed dialog item ID. A TYPE_SINGLECHEKBOX can only be used with TYPE_INT or TYPE_BOOL parameters.
- TYPE_CHECKBUTTON - A check button control. This button's state is either pressed or not. This control functions just like TYPE_SINGLECHEKBOX but is represented by a button in either a pressed in or unpressed state.
- TYPE_MULTICHEKBOX - Multiple check boxes are not supported.
- TYPE_COLORSWATCH - The color swatch control presents the user with the standard 3ds Max modeless color selector when the user clicks on the
control. The color swatch control displays the currently selected color. The TYPE_COLORSWATCH with the dialog item ID of the swatch custom control. This can only be used with TYPE_POINT3 or TYPE_RGBA parameter.
- TYPE_EDITBOX - An edit box control. This is a 3ds Max custom edit box control. The TYPE_EDITBOX must be followed by the dialog item ID of the edit box custom control. This can only be used with TYPE_STRING and TYPE_FILENAME parameters.
- TYPE_PICKNODEBUTTON - A scene node (INode) picker button. This is a 3ds Max ICustButton control used in a CBT_CHECK mode with GREEN_WASH highlight color, as per node picking button conventions. Follow the control type with the dialog item ID of the button control.
When the user presses this button a PickModeCallback command mode is entered and the user can pick a scene node under the filtering of any validation supplied (see tags p_validator, p_classID and p_sclassID). This can only be used with TYPE_INODE parameters. Use the p_prompt tag to supply a status line prompt.
- TYPE_TEXMAPBUTTON - A texture map selector button that supports drag and drop of texture maps. This is an ICustButton control used in CBT_PUSH mode. The control type must be followed by the dialog item ID of the button control. This button opens up a map selector
dialog when pressed. This can only be used with TYPE_TEXMAP parameters. Use the p_prompt tag to supply a status line prompt.
- TYPE_MTLBUTTON - A material selector button that supports drag and drop of materials. This is an ICustButton control used in CBT_PUSH mode. The control type must be followed by the dialog item ID of the button control. This button throws up a material selector
dialog when pressed. This can only be used with TYPE_MTL parameters. Use the p_prompt tag to supply a status line prompt.
- TYPE_FILEOPENBUTTON - This is an ICustButton control used in CBT_PUSH mode. The control type with the dialog item ID of the button control. This button open a standard Windows Open File dialog
for selecting a file name. This type can only be used with TYPE_STRING and TYPE_FILENAME parameters. Use any of the p_caption, p_init_file, and p_file_types tags to further control the dialog.
- TYPE_FILESAVEBUTTON - This is an ICustButton control used in CBT_PUSH mode. The control type with the dialog item ID of the button control. This button open a standard Windows Save File dialog
for selecting a file name. This type can only be used with TYPE_STRING and TYPE_FILENAME parameters. Use any of the p_caption, p_init_file, and p_file_types tags to further control the dialog.
- TYPE_INTLISTBOX - A list box control for integers. See the topic Int and Float List Boxes for more information.
- TYPE_FLOATLISTBOX - A list box control for floats. See the topic Int and Float List Boxes for more information.
- TYPE_INT_COMBOBOX - A combo box control that can be used with parameters of type TYPE_INT and TYPE_INT_TAB. See the topic Combo Boxes for more information.
- TYPE_POINT3LISTBOX - A series a controls for displaying and managing a list box control containing a Tab<Point3> parameter. The setup consists of a list box control, 3 buttons (for adding, replacing and deleting items), a source spinner
type, three pairs of edit boxes and spinners, and a display scale. After the control type, you must supply 4 dialog item IDs.
The first is the list box control, then dialog item IDs for 3 custom button controls for an add, replace, and delete button,
respectively. Follow this with the source spinner type, and the edit box and spinner for the first item, and finally the display
scale. Note that you can only use this with TYPE_POINT3_TAB parameters.
- TYPE_STRINGLISTBOX - A series a controls for displaying and managing a list box control containing a Tab< string> parameter. The setup consists of a list box control, 3 buttons (for adding, replacing and deleting items), and a
3ds Max custom edit box to supply source strings. After the control type, you supply 4 dialog item IDs. The first is the list
box control, then dialog item IDs for 3 custom button controls for the add, replace and delete button, respectively. These
are followed with the custom edit control dialog item ID. You can supply the value 0 for any of the add, replace, delete buttons
or custom edit control IDs if you don't need them in the dialog. This can only be used with TYPE_STRING_TAB parameters. The add, replace, and delete buttons automatically keep the parameter value synchronized with the list..
- TYPE_NODELISTBOX - A series a controls for displaying and managing a list box control containing a Tab<INode> parameter. The setup consists of a list box control, 3 buttons (for picking, replacing and deleting items). After the control
type, you supply 4 dialog item IDs. The first is the list box control, then one for 3 custom button controls for the pick,
replace, and delete button, respectively. The pick and replace buttons act exactly as TYPE_PICKNODEBUTTONS to get nodes to add to or replace in the list. You can supply the value 0 for any of the add, replace, delete buttons IDs
if you don't need them in the dialog. This control type can only be used with TYPE_INODE_TAB parameters. The pick, replace, and delete buttons automatically keep the Tab<> parameter in step with the list, including
managing References as needed.