本文整理汇总了C++中LLControlVariable::get方法的典型用法代码示例。如果您正苦于以下问题:C++ LLControlVariable::get方法的具体用法?C++ LLControlVariable::get怎么用?C++ LLControlVariable::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLControlVariable
的用法示例。
在下文中一共展示了LLControlVariable::get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getColor
LLColor4 LLControlGroup::getColor(const std::string& name)
{
ctrl_name_table_t::const_iterator i = mNameTable.find(name);
if (i != mNameTable.end())
{
LLControlVariable* control = i->second;
switch(control->mType)
{
case TYPE_COL4:
{
return LLColor4(control->get());
}
case TYPE_COL4U:
{
return LLColor4(LLColor4U(control->get()));
}
default:
{
CONTROL_ERRS << "Control " << name << " not a color" << llendl;
return LLColor4::white;
}
}
}
else
{
CONTROL_ERRS << "Invalid getColor control " << name << llendl;
return LLColor4::white;
}
}
示例2: findString
std::string LLControlGroup::findString(const std::string& name)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_STRING))
return control->get().asString();
return LLStringUtil::null;
}
示例3: getControl
LLColor3 LLControlGroup::getColor3(const std::string& name)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_COL3))
return control->get();
else
{
CONTROL_ERRS << "Invalid LLColor3 control " << name << llendl;
return LLColor3::white;
}
}
示例4: getRect
LLRect LLControlGroup::getRect(const std::string& name)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_RECT))
return control->get();
else
{
CONTROL_ERRS << "Invalid rect control " << name << llendl;
return LLRect::null;
}
}
示例5: getString
std::string LLControlGroup::getString(const std::string& name)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_STRING))
return control->get().asString();
else
{
CONTROL_ERRS << "Invalid string control " << name << llendl;
return LLStringUtil::null;
}
}
示例6: getBOOL
BOOL LLControlGroup::getBOOL(const std::string& name)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_BOOLEAN))
return control->get().asBoolean();
else
{
CONTROL_ERRS << "Invalid BOOL control " << name << llendl;
return FALSE;
}
}
示例7: toggleControl
//static
void LLViewerControlListener::toggleControl(LLControlGroup * controls, LLSD const & event_data)
{
if(event_data.has("key"))
{
std::string key(event_data["key"]);
if(controls->controlExists(key))
{
LLControlVariable * control = controls->getControl(key);
if(control->isType(TYPE_BOOLEAN))
{
control->set(!control->get().asBoolean());
}
else
{
llwarns << "requested toggle of non-boolean control: \"" << key << "\", type is " << control->type() << llendl;
}
}
else
{
llwarns << "requested unknown control: \"" << key << '\"' << llendl;
}
}
}
示例8: onClickExpandBtn
void wlfPanel_AdvSettings::onClickExpandBtn()
{
LLControlVariable* ctrl = gSavedSettings.getControl("wlfAdvSettingsPopup");
ctrl->set(!ctrl->get());
}
示例9: toggle_time_value
static void toggle_time_value()
{
LLControlVariable* control = gSavedSettings.getControl("LiruLocalTime");
control->set(!control->get());
}