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


C++ LLUIString类代码示例

本文整理汇总了C++中LLUIString的典型用法代码示例。如果您正苦于以下问题:C++ LLUIString类的具体用法?C++ LLUIString怎么用?C++ LLUIString使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLUIString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: childSetAction

BOOL LLFloaterLandHoldings::postBuild()
{
	childSetAction("Teleport", onClickTeleport, this);
	childSetAction("Show on Map", onClickMap, this);

	// Grant list
	childSetDoubleClickCallback("grant list", onGrantList);
	childSetUserData("grant list", this);

	LLCtrlListInterface *list = childGetListInterface("grant list");
	if (!list) return TRUE;

	S32 count = gAgent.mGroups.count();
	for(S32 i = 0; i < count; ++i)
	{
		LLUUID id(gAgent.mGroups.get(i).mID);

		LLSD element;
		element["id"] = id;
		element["columns"][0]["column"] = "group";
		element["columns"][0]["value"] = gAgent.mGroups.get(i).mName;
		element["columns"][0]["font"] = "SANSSERIF";

		LLUIString areastr = getString("area_string");
		areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution));
		element["columns"][1]["column"] = "area";
		element["columns"][1]["value"] = areastr;
		element["columns"][1]["font"] = "SANSSERIF";

		list->addElement(element, ADD_SORTED);
	}

	return TRUE;
}
开发者ID:9skunks,项目名称:imprudence,代码行数:34,代码来源:llfloaterlandholdings.cpp

示例2: LLFloaterBump

void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
{
	if (!sInstance)
	{
		new LLFloaterBump();
	}
	
	if (mcd->mFirstName.empty() || list->getItemCount() >= 20)
	{
		return;
	}

	// There's only one internal tm buffer.
	struct tm* timep;
	
	// Convert to Pacific, based on server's opinion of whether
	// it's daylight savings time there.
	timep = utc_to_pacific_time(mcd->mTime, gPacificDaylightTime);
	
	std::string time = llformat("[%d:%02d]", timep->tm_hour, timep->tm_min);

	std::string action;
	switch(mcd->mType)
	{
	case MEAN_BUMP:
		action = "bump";
		break;
	case MEAN_LLPUSHOBJECT:
		action = "llpushobject";
		break;
	case MEAN_SELECTED_OBJECT_COLLIDE:
		action = "selected_object_collide";
		break;
	case MEAN_SCRIPTED_OBJECT_COLLIDE:
		action = "scripted_object_collide";
		break;
	case MEAN_PHYSICAL_OBJECT_COLLIDE:
		action = "physical_object_collide";
		break;
	default:
		llinfos << "LLFloaterBump::add unknown mean collision type "
			<< mcd->mType << llendl;
		return;
	}

	// All above action strings are in XML file
	LLUIString text = sInstance->getString(action);
	text.setArg("[TIME]", time);
	text.setArg("[FIRST]", mcd->mFirstName);
	text.setArg("[LAST]", mcd->mLastName);

	LLSD row;
	row["id"] = mcd->mPerp;
	row["columns"][0]["value"] = text;
	row["columns"][0]["font"] = "SansSerifBold";
	list->addElement(row);

	//@hook OnBump(action,time,firstname,lastname) You were bumped by something
	LUA_CALL("OnBump") << action << time << mcd->mFirstName << mcd->mLastName << LUA_END;
}
开发者ID:N3X15,项目名称:Luna-Viewer,代码行数:60,代码来源:llfloaterbump.cpp

示例3: noteOfflineUsers

void LLIMMgr::noteOfflineUsers(
	LLFloaterIMPanel* floater,
	const LLDynamicArray<LLUUID>& ids)
{
	S32 count = ids.count();
	if(count == 0)
	{
		floater->addHistoryLine(sOnlyUserMessage, gSavedSettings.getColor4("SystemChatColor"));
	}
	else
	{
		const LLRelationship* info = NULL;
		LLAvatarTracker& at = LLAvatarTracker::instance();
		for(S32 i = 0; i < count; ++i)
		{
			info = at.getBuddyInfo(ids.get(i));
			std::string full_name;
			if(info && !info->isOnline()
			   && gCacheName->getFullName(ids.get(i), full_name))
			{
				LLUIString offline = sOfflineMessage;
				offline.setArg("[NAME]", full_name);
				floater->addHistoryLine(offline, gSavedSettings.getColor4("SystemChatColor"));
			}
		}
	}
}
开发者ID:IamusNavarathna,项目名称:SingularityViewer,代码行数:27,代码来源:llimview.cpp

示例4: noteOfflineUsers

void LLIMMgr::noteOfflineUsers(
	LLFloaterIMPanel* floater,
	const std::vector<LLUUID>& ids)
{
	S32 count = ids.size();
	if(count == 0)
	{
		const std::string& only_user = LLTrans::getString("only_user_message");
		floater->addHistoryLine(only_user, gSavedSettings.getColor4("SystemChatColor"));
	}
	else
	{
		const LLRelationship* info = NULL;
		LLAvatarTracker& at = LLAvatarTracker::instance();
		for(S32 i = 0; i < count; ++i)
		{
			info = at.getBuddyInfo(ids.at(i));
			std::string full_name;
			if (info
				&& !info->isOnline()
				&& LLAvatarNameCache::getNSName(ids.at(i), full_name))
			{
				LLUIString offline = LLTrans::getString("offline_message");
				offline.setArg("[NAME]", full_name);
				floater->addHistoryLine(offline, gSavedSettings.getColor4("SystemChatColor"));
			}
		}
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:29,代码来源:llimview.cpp

示例5: addSystemMessage

void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args)
{
	LLUIString message;
	
	// null session id means near me (chat history)
	if (session_id.isNull())
	{
		LLFloaterChat* floaterp = LLFloaterChat::getInstance();

		message = floaterp->getString(message_name);
		message.setArgs(args);

		LLChat chat(message);
		chat.mSourceType = CHAT_SOURCE_SYSTEM;
		LLFloaterChat::getInstance()->addChatHistory(chat);
	}
	else // going to IM session
	{
		LLFloaterIMPanel* floaterp = findFloaterBySession(session_id);
		if (floaterp)
		{
			message = floaterp->getString(message_name);
			message.setArgs(args);

			gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString());
		}
	}
}
开发者ID:IamusNavarathna,项目名称:SingularityViewer,代码行数:28,代码来源:llimview.cpp

示例6: addAgent

void LLFloaterNewIM::addAgent(const LLUUID& uuid, void* data, BOOL online)
{
	std::string first, last;
	gCacheName->getName(uuid, first, last);
	LLUIString fullname = sNameFormat;
	fullname.setArg("[FIRST]", first);
	fullname.setArg("[LAST]", last);

	LLSD row;
	row["id"] = uuid;
	row["columns"][0]["value"] = fullname;
	row["columns"][0]["width"] = COL_1_WIDTH;
	row["columns"][0]["font"] = "SANSSERIF";
	row["columns"][0]["font-style"] = online ? "BOLD" : "NORMAL";
	row["columns"][1]["value"] = online ? sOnlineDescriptor : "";
	row["columns"][1]["font"] = "SANSSERIF";
	row["columns"][1]["font-style"] = "BOLD";
	LLScrollListItem* itemp = mSelectionList->addElement(row);
	itemp->setUserdata(data);

	if (mSelectionList->getFirstSelectedIndex() == -1)
	{
		mSelectionList->selectFirstItem();
	}
}
开发者ID:Nora28,项目名称:imprudence,代码行数:25,代码来源:llfloaternewim.cpp

示例7: getOfflineMessage

std::string LLIMMgr::getOfflineMessage(const LLUUID& id)
{
	std::string full_name;
	if (LLAvatarNameCache::getNSName(id, full_name))
	{
		LLUIString offline = LLTrans::getString("offline_message");
		offline.setArg("[NAME]", full_name);
		return offline;
	}
	return LLStringUtil::null;
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:11,代码来源:llimview.cpp

示例8: getString

BOOL LLFloaterJoystick::postBuild()
{		
	F32 range = gSavedSettings.getBOOL("Cursor3D") ? 1024.f : 2.f;
	LLUIString axis = getString("Axis");
	LLUIString joystick = getString("JoystickMonitor");

	// use this child to get relative positioning info; we'll place the
	// joystick monitor on its right, vertically aligned to it.
	LLView* child = getChild<LLView>("FlycamAxisScale1");
	LLRect rect;

	if (child)
	{
		LLRect r = child->getRect();
		rect = LLRect(350, r.mTop, r.mRight + 200, 0);
	}


	LLStatView::Params params;
	params.name("axis values");
	params.rect(rect);
	params.show_label(true);
	params.label(joystick);
	mAxisStatsView = LLUICtrlFactory::create<LLStatView>(params);

	for (U32 i = 0; i < 6; i++)
	{
		axis.setArg("[NUM]", llformat("%d", i));
		std::string stat_name(llformat("Joystick axis %d", i));
		mAxisStats[i] = new LLStat(stat_name,4);
		mAxisStatsBar[i] = mAxisStatsView->addStat(axis, mAxisStats[i]);
		mAxisStatsBar[i]->mMinBar = -range;
		mAxisStatsBar[i]->mMaxBar = range;
		mAxisStatsBar[i]->mLabelSpacing = range * 0.5f;
		mAxisStatsBar[i]->mTickSpacing = range * 0.25f;			
	}

	addChild(mAxisStatsView);
	
	mCheckJoystickEnabled = getChild<LLCheckBoxCtrl>("enable_joystick");
	childSetCommitCallback("enable_joystick",onCommitJoystickEnabled,this);
	mCheckFlycamEnabled = getChild<LLCheckBoxCtrl>("JoystickFlycamEnabled");
	childSetCommitCallback("JoystickFlycamEnabled",onCommitJoystickEnabled,this);

	getChild<LLUICtrl>("Default")->setCommitCallback(boost::bind(&LLFloaterJoystick::onClickDefault, this, _2));
	childSetAction("cancel_btn", onClickCancel, this);
	childSetAction("ok_btn", onClickOK, this);

	refresh();
	return TRUE;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:51,代码来源:llfloaterjoystick.cpp

示例9: utc_to_pacific_time

void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
{
	if (mcd->mFullName.empty() || list->getItemCount() >= 20)
	{
		return;
	}

	// There's only one internal tm buffer.
	// Convert to Pacific, based on server's opinion of whether
	// it's daylight savings time there.
	tm* timep = utc_to_pacific_time(mcd->mTime, gPacificDaylightTime);
	
	std::string timeStr = llformat("[%d:%02d]", timep->tm_hour, timep->tm_min);

	std::string action;
	switch(mcd->mType)
	{
	case MEAN_BUMP:
		action = "bump";
		break;
	case MEAN_LLPUSHOBJECT:
		action = "llpushobject";
		break;
	case MEAN_SELECTED_OBJECT_COLLIDE:
		action = "selected_object_collide";
		break;
	case MEAN_SCRIPTED_OBJECT_COLLIDE:
		action = "scripted_object_collide";
		break;
	case MEAN_PHYSICAL_OBJECT_COLLIDE:
		action = "physical_object_collide";
		break;
	default:
		LL_INFOS() << "LLFloaterBump::add unknown mean collision type "
			<< mcd->mType << LL_ENDL;
		return;
	}

	// All above action strings are in XML file
	LLUIString text = getString(action);
	text.setArg("[TIME]", timeStr);
	text.setArg("[NAME]", mcd->mFullName);

	LLSD row;
	row["id"] = mcd->mPerp;
	row["columns"][0]["value"] = text;
	row["columns"][0]["font"] = "SansSerifBold";
	list->addElement(row);
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:49,代码来源:llfloaterbump.cpp

示例10: getString

void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
{
	if (mcd->mFirstName.empty() || list->getItemCount() >= 20)
	{
		return;
	}

	std::string timeStr = getString ("timeStr");
	LLSD substitution;

	substitution["datetime"] = (S32) mcd->mTime;
	LLStringUtil::format (timeStr, substitution);

	std::string action;
	switch(mcd->mType)
	{
	case MEAN_BUMP:
		action = "bump";
		break;
	case MEAN_LLPUSHOBJECT:
		action = "llpushobject";
		break;
	case MEAN_SELECTED_OBJECT_COLLIDE:
		action = "selected_object_collide";
		break;
	case MEAN_SCRIPTED_OBJECT_COLLIDE:
		action = "scripted_object_collide";
		break;
	case MEAN_PHYSICAL_OBJECT_COLLIDE:
		action = "physical_object_collide";
		break;
	default:
		llinfos << "LLFloaterBump::add unknown mean collision type "
			<< mcd->mType << llendl;
		return;
	}

	// All above action strings are in XML file
	LLUIString text = getString(action);
	text.setArg("[TIME]", timeStr);
	text.setArg("[FIRST]", mcd->mFirstName);
	text.setArg("[LAST]", mcd->mLastName);

	LLSD row;
	row["id"] = mcd->mPerp;
	row["columns"][0]["value"] = text;
	row["columns"][0]["font"] = "SansSerifBold";
	list->addElement(row);
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:49,代码来源:llfloaterbump.cpp

示例11: buy

void LLCurrencyUIManager::buy(const std::string& buy_msg)
{
	if (!canBuy())
	{
		return;
	}

	LLUIString msg = buy_msg;
	msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy));
	msg.setArg("[LOCALAMOUNT]", getLocalEstimate());
	LLConfirmationManager::confirm(impl.mSiteConfirm,
								   msg,
								   impl,
								   &LLCurrencyUIManager::Impl::startCurrencyBuy);
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:15,代码来源:llcurrencyuimanager.cpp

示例12: buy

void LLCurrencyUIManager::buy(const std::string& buy_msg)
{
	if (!canBuy())
	{
		return;
	}

	LLUIString msg = buy_msg;
	msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy));
	msg.setArg("[USD]", llformat("%#.2f", impl.mSiteCurrencyEstimatedCost / 100.0));
	LLConfirmationManager::confirm(impl.mSiteConfirm,
								   msg,
								   impl,
								   &LLCurrencyUIManager::Impl::startCurrencyBuy);
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:15,代码来源:llcurrencyuimanager.cpp

示例13: buy

void LLCurrencyUIManager::buy(const std::string& buy_msg)
{
	if (!canBuy())
	{
		return;
	}

	LLUIString msg = buy_msg;
	msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy));
	msg.setArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
	msg.setArg("[USD]", llformat("%#.2f", impl.mSiteCurrencyEstimatedCost / 100.0));
	msg.setArg("[REALCURRENCY]", gHippoGridManager->getConnectedGrid()->getRealCurrencySymbol());
	LLConfirmationManager::confirm(impl.mSiteConfirm,
								   msg,
								   impl,
								   &LLCurrencyUIManager::Impl::startCurrencyBuy);
}
开发者ID:Nekrofage,项目名称:SingularityViewer,代码行数:17,代码来源:llcurrencyuimanager.cpp

示例14: LLFloaterJoystick

// static
void LLFloaterJoystick::show(void*)
{
	if (sInstance)
	{
		sInstance->open();	/*Flawfinder: ignore*/
	}
	else
	{
		LLFloaterJoystick* floater = new LLFloaterJoystick();

		gUICtrlFactory->buildFloater(floater, "floater_joystick.xml");
		F32 range = gSavedSettings.getBOOL("FlycamAbsolute") ? 1024.f : 2.f;
		LLUIString axis = floater->childGetText("Axis");
		LLUIString joystick = floater->childGetText("JoystickMonitor");

		LLView* child = floater->getChildByName("ZoomLabel");
		LLRect rect;

		if (child)
		{
			LLRect r = child->getRect();
			LLRect f = floater->getRect();
			rect = LLRect(150, r.mTop, r.mRight, 0);
		}

		floater->mAxisStats = new LLStatView("axis values", joystick, "", rect);
		floater->mAxisStats->setDisplayChildren(TRUE);

		for (U32 i = 0; i < 6; i++)
		{
			axis.setArg("[NUM]", llformat("%d", i));
			floater->mAxis[i] = new LLStat(4);
			floater->mAxisBar[i] = floater->mAxisStats->addStat(axis, floater->mAxis[i]);
			floater->mAxisBar[i]->mMinBar = -range;
			floater->mAxisBar[i]->mMaxBar = range;
			floater->mAxisBar[i]->mLabelSpacing = range * 0.5f;
			floater->mAxisBar[i]->mTickSpacing = range * 0.25f;			
		}

		

		floater->addChild(floater->mAxisStats);
		floater->open();	/*Flawfinder: ignore*/
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:46,代码来源:llcameraview.cpp

示例15: getItem

void LLPreview::refreshFromItem()
{
	const LLInventoryItem* item = getItem();
	if (!item)
	{
		return;
	}
	if (hasString("Title"))
	{
		LLStringUtil::format_map_t args;
		args["[NAME]"] = item->getName();
		LLUIString title = getString("Title", args);
		setTitle(title.getString());
	}
	getChild<LLUICtrl>("desc")->setValue(item->getDescription());

	getChildView("desc")->setEnabled(canModify(mObjectUUID, item));
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:18,代码来源:llpreview.cpp


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