# Count Of List Items
Grammar — Count of list items of list for player
Flags —Native
|Function
Returns the count of list items in the dialog item. Only works with dialog items that have lists, such as pulldowns or list boxes.
# Arguments
int
<control> — Listint
— Player
Returns — int
native int DialogControlGetItemCount(
int control,
int player,
);
# Related
Category: Dialog / Dialog Item Values
- Set Dialog Item Current Value —
void
— libNtve_gf_SetDialogItemCurrentValue - Set Dialog Item Minimum Value —
void
— libNtve_gf_SetDialogItemMinimumValue - Set Dialog Item Maximum Value —
void
— libNtve_gf_SetDialogItemMaximumValue - Set Dialog Item Checked —
void
— libNtve_gf_SetDialogItemChecked - Set Dialog Item Edit Value —
void
— libNtve_gf_SetDialogItemEditorValue - Dialog Item Current Value —
fixed
— libNtve_gf_DialogItemValue - Dialog Item Maximum Value —
fixed
— libNtve_gf_DialogItemMaximumValue - Dialog Item Minimum Value —
fixed
— libNtve_gf_DialogItemMinimumValue - Dialog Item Is Checked —
bool
— libNtve_gf_DialogItemIsChecked - Dialog Item Edit Value —
string
— libNtve_gf_DialogItemEditValue - Add List Item —
void
— DialogControlAddItem - Select List Item —
void
— DialogControlSelectItem - Clear List Selection —
void
— DialogControlClearSelectedItem - Selected List Item —
int
— DialogControlGetSelectedItem - Count Of List Items —
int
— DialogControlGetItemCount - Remove List Item —
void
— DialogControlRemoveItem - Remove All List Items —
void
— DialogControlRemoveAllItems - Add Graph Data Point —
void
— DialogControlAddDataPoint - Remove All Graph Data Points —
void
— DialogControlRemoveAllDataPoints - Set Graph Data Color —
void
— DialogControlSetDataColor - Set Graph Data Name —
void
— DialogControlSetDataName - Set Graph Minimum X Visible —
void
— DialogControlSetMinXVisible - Get Graph Minimum X Value —
fixed
— DialogControlGetMinXValue - Set Graph Maximum X Visible —
void
— DialogControlSetMaxXVisible - Get Graph Maximum X Value —
fixed
— DialogControlGetMaxXValue - Set Graph Minimum Y Visible —
void
— DialogControlSetMinYVisible - Get Graph Minimum Y Value —
fixed
— DialogControlGetMinYValue - Set Graph Maximum Y Visible —
void
— DialogControlSetMaxYVisible - Get Graph Maximum Y Value —
fixed
— DialogControlGetMaxYValue
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:2186
// Implementation
DialogControlRemoveAllItems(libUIUI_gv_uIDebugPanel.lv_mountVariationDropdown, libCore_gv_playerGroupFromPlayer[lp_player]);
if ((DialogControlGetItemCount(libUIUI_gv_uIDebugPanel.lv_mountBaseDropdown, lp_player) <= 0)) {
return ;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:10757
lv_listIndexLeft = DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_soundVOList, lv_triggeringPlayer);
lv_listRight = libUIUI_gv_uIDebugPanel.lv_soundVOPlayList;
lv_listCountRight = DialogControlGetItemCount(lv_listRight, lv_triggeringPlayer);
// Conditions
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:10871
lv_soundID = DataTableGetString(true, ("DEBUG_AnnouncerVOSoundLink_Player_" + IntToString(lv_triggeringPlayer) + "_ListIndex_" + IntToString(lv_listIndexLeft) + "_SoundID"));
DialogControlAddItem(lv_listRight, PlayerGroupSingle(lv_triggeringPlayer), StringToText(lv_soundID));
DataTableSetString(true, ("DEBUG_SoundVOPlayBox_Player_" + IntToString(lv_triggeringPlayer) + "_ListIndex_" + IntToString(DialogControlGetItemCount(lv_listRight, lv_triggeringPlayer)) + "_SoundID"), lv_soundID);
return true;
}