当前位置: 首页>>代码示例>>C++>>正文


C++ LLControlVariable::get方法代码示例

本文整理汇总了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;
	}
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:31,代码来源:llcontrol.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例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;
	}
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:12,代码来源:llcontrol.cpp

示例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;
	}
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:12,代码来源:llcontrol.cpp

示例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;
	}
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:12,代码来源:llcontrol.cpp

示例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;
	}
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:12,代码来源:llcontrol.cpp

示例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;
		}
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:25,代码来源:llviewercontrollistener.cpp

示例8: onClickExpandBtn

void wlfPanel_AdvSettings::onClickExpandBtn()
{
	LLControlVariable* ctrl = gSavedSettings.getControl("wlfAdvSettingsPopup");
	ctrl->set(!ctrl->get());
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:5,代码来源:wlfPanel_AdvSettings.cpp

示例9: toggle_time_value

static void toggle_time_value()
{
	LLControlVariable* control = gSavedSettings.getControl("LiruLocalTime");
	control->set(!control->get());
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:5,代码来源:llstatusbar.cpp


注:本文中的LLControlVariable::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。