本文整理汇总了C++中LLComboBox::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ LLComboBox::clear方法的具体用法?C++ LLComboBox::clear怎么用?C++ LLComboBox::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLComboBox
的用法示例。
在下文中一共展示了LLComboBox::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refresh
// Update controls based on current settings
void LLPrefsAscentVan::refresh()
{
//General --------------------------------------------------------------------------------
//Tags\Colors ----------------------------------------------------------------------------
//Colors ---------------------------------------------------------------------------------
LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox");
if(LLVOAvatar::sClientResolutionList.has("isComplete"))
{
//combo->setColor(LLColor4::black);
combo->clear();
for(LLSD::map_iterator itr = LLVOAvatar::sClientResolutionList.beginMap(); itr != LLVOAvatar::sClientResolutionList.endMap(); itr++)
{
LLSD value = (*itr).second;
if(value.has("name"))
{
std::string name = value.get("name");
std::string uuid = (*itr).first;
LLColor4 color = LLColor4(value.get("color"));
if(value["multiple"].asReal() != 0)
{
color *= 1.0/(value["multiple"].asReal()+1.0f);
}
LLScrollListItem* item = combo->add(name,uuid);
//bad practice
item->getColumn(0)->setColor(color);
}
}
//add Viewer 2.0
LLScrollListItem* item = combo->add("Viewer 2.0",IMG_DEFAULT_AVATAR);
//bad practice
item->getColumn(0)->setColor(LLColor4::black);
}
combo->setCurrentByIndex(mSelectedClient);
childSetEnabled("friends_color_textbox", mUseStatusColors);
childSetEnabled("friend_color_swatch", mUseStatusColors);
childSetEnabled("estate_owner_color_swatch", mUseStatusColors);
childSetEnabled("linden_color_swatch", mUseStatusColors);
childSetEnabled("muted_color_swatch", mUseStatusColors);
childSetEnabled("custom_tag_label_text", mCustomTagOn);
childSetEnabled("custom_tag_label_box", mCustomTagOn);
childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
childSetEnabled("custom_tag_color_text", mCustomTagOn);
childSetEnabled("custom_tag_color_swatch", mCustomTagOn);
//Body Dynamics --------------------------------------------------------------------------
childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobVelMax", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobVelMin", mBreastPhysicsToggle);
}
示例2: SetDefault
BOOL LLFloaterAO::SetDefault(void* userdata, LLUUID ao_id, std::string defaultanim)
{
if (sInstance && (userdata))
{
LLComboBox *box = (LLComboBox *) userdata;
if (LLUUID::null == ao_id)
{
box->clear();
box->removeall();
}
else
{
box->selectByValue(defaultanim);
}
}
return TRUE;
}
示例3: refresh
//.........这里部分代码省略.........
childSetEnabled("Next owner can:",false);
childSetValue("checkbox next owner can modify",FALSE);
childSetEnabled("checkbox next owner can modify",false);
childSetValue("checkbox next owner can copy",FALSE);
childSetEnabled("checkbox next owner can copy",false);
childSetValue("checkbox next owner can transfer",FALSE);
childSetEnabled("checkbox next owner can transfer",false);
//checkbox for sale
childSetValue("checkbox for sale",FALSE);
childSetEnabled("checkbox for sale",false);
//checkbox include in search
childSetValue("search_check", FALSE);
childSetEnabled("search_check", false);
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
if(RadioSaleType)
{
RadioSaleType->setSelectedIndex(-1);
RadioSaleType->setEnabled(FALSE);
}
childSetEnabled("Cost",false);
childSetText("Cost", getString("Cost Default", argsCurrency));
childSetText("Edit Cost",LLStringUtil::null);
childSetEnabled("Edit Cost",false);
childSetEnabled("label click action",false);
LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction");
if(ComboClickAction)
{
ComboClickAction->setEnabled(FALSE);
ComboClickAction->clear();
}
childSetVisible("B:",false);
childSetVisible("O:",false);
childSetVisible("G:",false);
childSetVisible("E:",false);
childSetVisible("N:",false);
childSetVisible("F:",false);
return;
}
// figure out a few variables
BOOL is_one_object = (object_count == 1);
// BUG: fails if a root and non-root are both single-selected.
BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsModify())
|| LLSelectMgr::getInstance()->selectGetModify();
const LLView* keyboard_focus_view = gFocusMgr.getKeyboardFocus();
S32 string_index = 0;
std::string MODIFY_INFO_STRINGS[] =
{
getString("text modify info 1"),
getString("text modify info 2"),
getString("text modify info 3"),
getString("text modify info 4")
};
if(!is_perm_modify)
{
string_index += 2;
}
if(!is_one_object)