コード例 #1
0
//static
BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color)
{
	std::string colorstring;
	BOOL res = node->getAttributeString(name.c_str(), colorstring);
	if (res && LLUI::sColorsGroup)
	{
		if (LLUI::sColorsGroup->controlExists(colorstring))
		{
			color.setVec(LLUI::sColorsGroup->getColor(colorstring));
		}
		else
		{
			res = FALSE;
		}
	}
	if (!res)
	{
		res = LLColor4::parseColor(colorstring, &color);
	}	
	if (!res)
	{
		res = node->getAttributeColor(name.c_str(), color);
	}
	return res;
}
コード例 #2
0
void init_colors()
{
	gTrackColor = LLColor4::red;
	gDisabledTrackColor.setVec(		0.5f, 0.f, 0.f, 1.f );
	gLandmarkMapColor = LLColor4::red;
	gLocationMapColor.setVec(		0.f, 0.72f, 1.f, 1.f);
	gTelehubMapColor.setVec(		0.9f, 0.9f, 0.f, 1.f); // dk yellow
	gEventColor.setVec(				1.f, 0.5f, 1.f, 1.f );
	gPopularColor.setVec(			1.f, 0.0f, 0.f, 1.f );
	gPickColor.setVec(				1.f, 0.0f, 0.f, 1.f );
	gHomeColor.setVec(				0.f, 0.5f, 1.f, 1.f );
}
コード例 #3
0
void init_colors()
{
	gTrackColor	= LLColor4::red;
	gDisabledTrackColor.setVec(		0.5f, 0.f, 0.f, 1.f );

	gSelfMapColor     = LLColor4::white;
	gAvatarMapColor   = LLColor4::green;
	gFriendMapColor   = LLColor4::yellow;
	// fleshy color
	//gAvatarMapColor.setVec( 255.f/255.f, 223.f/255.f, 170.f/255.f, 1.f);

	gLandmarkMapColor = LLColor4::red;
	gLocationMapColor.setVec(		0.f, 0.72f, 1.f, 1.f);
	gTelehubMapColor.setVec(		0.9f, 0.9f, 0.f, 1.f); // dk yellow
	gFrustumMapColor.setVec(		1.f, 1.f, 1.f, 0.08f);
	gRotatingFrustumMapColor.setVec(1.f, 1.f, 1.f, 0.2f);
	gEventColor.setVec(				1.f, 0.5f, 1.f, 1.f );
	gPopularColor.setVec(			1.f, 0.0f, 0.f, 1.f );
	gPickColor.setVec(				1.f, 0.0f, 0.f, 1.f );
	gHomeColor.setVec(				0.f, 0.5f, 1.f, 1.f );
}
コード例 #4
0
ファイル: llhudeffecttrail.cpp プロジェクト: Boy/rainbow
void LLHUDEffectSpiral::triggerLocal()
{
	mKillTime = mTimer.getElapsedTimeF32() + mDuration;

	BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam");

	LLColor4 color;
	color.setVec(mColor);

	if (!mPartSourcep)
	{
		if (!mTargetObject.isNull() && !mSourceObject.isNull())
		{
			if (show_beam)
			{
				LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
				psb->setColor(color);
				psb->setSourceObject(mSourceObject);
				psb->setTargetObject(mTargetObject);
				psb->setOwnerUUID(gAgent.getID());
				LLViewerPartSim::getInstance()->addPartSource(psb);
				mPartSourcep = psb;
			}
		}
		else
		{
			if (!mSourceObject.isNull() && !mPositionGlobal.isExactlyZero())
			{
				if (show_beam)
				{
					LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
					psb->setSourceObject(mSourceObject);
					psb->setTargetObject(NULL);
					psb->setColor(color);
					psb->mLKGTargetPosGlobal = mPositionGlobal;
					psb->setOwnerUUID(gAgent.getID());
					LLViewerPartSim::getInstance()->addPartSource(psb);
					mPartSourcep = psb;
				}
			}
			else
			{
				LLVector3 pos;
				if (mSourceObject)
				{
					pos = mSourceObject->getPositionAgent();
				}
				else
				{
					pos = gAgent.getPosAgentFromGlobal(mPositionGlobal);
				}
				LLPointer<LLViewerPartSourceSpiral> pss = new LLViewerPartSourceSpiral(pos);
				if (!mSourceObject.isNull())
				{
					pss->setSourceObject(mSourceObject);
				}
				pss->setColor(color);
				pss->setOwnerUUID(gAgent.getID());
				LLViewerPartSim::getInstance()->addPartSource(pss);
				mPartSourcep = pss;
			}
		}
	}
	else
	{
		LLPointer<LLViewerPartSource>& ps = mPartSourcep;
		if (mPartSourcep->getType() == LLViewerPartSource::LL_PART_SOURCE_BEAM)
		{
			LLViewerPartSourceBeam *psb = (LLViewerPartSourceBeam *)ps.get();
			psb->setSourceObject(mSourceObject);
			psb->setTargetObject(mTargetObject);
			psb->setColor(color);
			if (mTargetObject.isNull())
			{
				psb->mLKGTargetPosGlobal = mPositionGlobal;
			}
		}
		else
		{
			LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
			pss->setSourceObject(mSourceObject);
		}
	}

	mbInit = TRUE;
}