The developer must define the ParamUIDesc
arrays to establish the properties of the UI controls such as their type (spinner, radio button, check box, etc.), which resource ID they refer to, and which index into the virtual array they use. Below is the ParamUIDesc
array for the parameters roll-up page. It calls several overloaded constructors passing the values needed to describe the controls. See the ParamUIDesc
Reference section for detailed information on the constructors.
static int squashIDs[] = {IDC_HEMI_CHOP,IDC_HEMI_SQUASH};
static ParamUIDesc descParam[] = {
// Radius
ParamUIDesc(
PB_RADIUS, // Virtual array index
EDITTYPE_UNIVERSE, // Type of value to edit
IDC_RADIUS,IDC_RADSPINNER, // Resource IDs
MIN_RADIUS,MAX_RADIUS, // Upper and lower limits on the value
SPIN_AUTOSCALE), // Scale factor for up/down arrow clicks
// Segments
ParamUIDesc(
PB_SEGS,
EDITTYPE_INT,
IDC_SEGMENTS,IDC_SEGSPINNER,
(float)MIN_SEGMENTS,(float)MAX_SEGMENTS,
0.1f),
// Smooth
ParamUIDesc(PB_SMOOTH,TYPE_SINGLECHEKBOX,IDC_OBSMOOTH),
// Hemisphere
ParamUIDesc(
PB_HEMI,
EDITTYPE_FLOAT,
IDC_HEMISPHERE,IDC_HEMISPHERESPINNER,
0.0f,1.0f,
0.005f),
// Chop/squash
ParamUIDesc(PB_SQUASH,TYPE_RADIO,squashIDs,2),
// Recenter
ParamUIDesc(PB_RECENTER,TYPE_SINGLECHEKBOX,IDC_HEMI_RECENTER)
};
#define PARAMDESC_LENGH 6
A list of possible controls can be found in the topic Parameter UI Control Types.