// static
void LLFloaterMessageBuilder::onClickSend(void* user_data)
{
	LLFloaterMessageBuilder* floaterp = (LLFloaterMessageBuilder*)user_data;

	LLScrollListCtrl* scrollp = floaterp->getChild<LLScrollListCtrl>("net_list");
	LLScrollListItem* selected_itemp = scrollp->getFirstSelected();

	//if a specific circuit is selected, send it to that, otherwise send it to the current sim
	if(selected_itemp)
	{
		LLNetListItem* itemp = findNetListItem(selected_itemp->getUUID());
		LLScrollListText* textColumn = (LLScrollListText*)selected_itemp->getColumn(1);

		//why would you send data through a dead circuit?
		if(textColumn->getValue().asString() == "Dead")
		{
			LLFloaterChat::addChat(LLChat("No sending messages through dead circuits!"));
			return;
		}

		floaterp->mSpoofer.spoofMessage(itemp->mCircuitData->getHost(), floaterp->childGetText("message_edit"));
	}
	else
	{
		floaterp->mSpoofer.spoofMessage(gAgent.getRegionHost(), floaterp->childGetText("message_edit"));
	}
}
void LLFloaterAttachments::onClickTextures(void* user_data)
{
	LLFloaterAttachments* floaterp = (LLFloaterAttachments*)user_data;

	LLScrollListCtrl* scrollp = floaterp->getChild<LLScrollListCtrl>("attachment_list");
	LLScrollListItem* scroll_itemp = scrollp->getFirstSelected();
	if(scroll_itemp)
	{
		std::vector<LLUUID> textures = floaterp->mHUDAttachmentPrims[scroll_itemp->getUUID()]->mTextures;

		std::set<LLUUID> seen_textures;

		std::vector<LLUUID>::iterator it_textures = textures.begin();
		std::vector<LLUUID>::iterator it_textures_end = textures.end();

		while(it_textures != it_textures_end)
		{
			if(seen_textures.count((*it_textures)) == 0)
			{
				seen_textures.insert((*it_textures));
				LLFloaterChat::addChat(LLChat((*it_textures).asString()));
			}
			it_textures++;
		}
	}
}
示例#3
0
void LLCheats::onCheatEnabled(std::string code_name)
{
	LLFloaterChat::addChat(LLChat(code_name + " code entered"));
	if(code_name == "MochaScript")
	{
		LLFloaterMochaScript::show();
		cheatCodes[code_name].entered = false;
	}
}