Ejemplo n.º 1
0
//static
void LLFloaterAO::onClickLoad(void* user_data)
{
	LLFloaterAO* floater = (LLFloaterAO*)user_data;

	LLFilePicker& file_picker = LLFilePicker::instance();
	if(file_picker.getOpenFile(LLFilePicker::FFLOAD_AO))
	{
		std::string file_name = file_picker.getFirstFile();
		llifstream xml_file(file_name);
		if(!xml_file.is_open()) return;
		LLSD data;
		if(LLSDSerialize::fromXML(data, xml_file) >= 1)
		{
			if(LLAO::isEnabled())
				LLAO::runAnims(FALSE);

			gSavedPerAccountSettings.setLLSD("AO.Settings", data);
			LLAO::refresh();

			if(LLAO::isEnabled())
				LLAO::runAnims(TRUE);

			floater->refresh();
		}
		xml_file.close();
	}
}
Ejemplo n.º 2
0
//static
void LLFloaterAO::onClickStandAdd(void* user_data)
{
	LLFloaterAO* floater = (LLFloaterAO*)user_data;
	LLUUID id = LLUUID(floater->mStandsCombo->getValue());
	std::list<LLUUID>::iterator itr = std::find(LLAO::mStandOverrides.begin(),LLAO::mStandOverrides.end(),id);
	LLVOAvatar* avatarp = gAgent.getAvatarObject();
	if(id.notNull() && itr == LLAO::mStandOverrides.end())
	{
		//back is always last played
		avatarp->stopMotion(LLAO::mStandOverrides.back());
		avatarp->startMotion(id);
		LLAO::mStandOverrides.push_back(id);

		floater->refresh();
		LLAO::mTimer->reset();
	}
	onCommitAnim(NULL,user_data);
}
Ejemplo n.º 3
0
// static
void LLFloaterAO::onCommitType(LLUICtrl* ctrl, void* user_data)
{
	LLFloaterAO* floater = (LLFloaterAO*)user_data;
	floater->mCurrentAnimType = floater->mAnimTypeCombo->getValue().asString();
	floater->refresh();
}
Ejemplo n.º 4
0
// static
void LLFloaterAO::onCommitAnim(LLUICtrl* ctrl, void* user_data)
{
	LLFloaterAO* floater = (LLFloaterAO*)user_data;

	LLSD overrides;
	LLUUID id;
	id = LLUUID(floater->childGetValue("line_walking").asString());
	if(id.notNull()) overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"] = id;
	id = LLUUID(floater->childGetValue("line_running").asString());
	if(id.notNull()) overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"] = id;
	id = LLUUID(floater->childGetValue("line_crouchwalk").asString());
	if(id.notNull()) overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"] = id;
	id = LLUUID(floater->childGetValue("line_flying").asString());
	if(id.notNull()) overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"] = id;
	id = LLUUID(floater->childGetValue("line_turn_left").asString());
	if(id.notNull()) overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"] = id;
	id = LLUUID(floater->childGetValue("line_turn_right").asString());
	if(id.notNull()) overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"] = id;
	id = LLUUID(floater->childGetValue("line_jumping").asString());
	if(id.notNull()) overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"] = id;
	id = LLUUID(floater->childGetValue("line_fly_up").asString());
	if(id.notNull()) overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"] = id;
	id = LLUUID(floater->childGetValue("line_crouching").asString());
	if(id.notNull()) overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"] = id;
	id = LLUUID(floater->childGetValue("line_fly_down").asString());
	if(id.notNull()) overrides["20f063ea-8306-2562-0b07-5c853b37b31e"] = id;
	id = LLUUID(floater->childGetValue("line_hover").asString());
	if(id.notNull()) overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"] = id;
	id = LLUUID(floater->childGetValue("line_sitting").asString());
	if(id.notNull()) overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"] = id;
	id = LLUUID(floater->childGetValue("line_prejump").asString());
	if(id.notNull()) overrides["7a4e87fe-de39-6fcb-6223-024b00893244"] = id;
	id = LLUUID(floater->childGetValue("line_falling").asString());
	if(id.notNull()) overrides["666307d9-a860-572d-6fd4-c3ab8865c094"] = id;
	id = LLUUID(floater->childGetValue("line_stride").asString());
	if(id.notNull()) overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"] = id;
	id = LLUUID(floater->childGetValue("line_soft_landing").asString());
	if(id.notNull()) overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"] = id;
	id = LLUUID(floater->childGetValue("line_medium_landing").asString());
	if(id.notNull()) overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"] = id;
	id = LLUUID(floater->childGetValue("line_hard_landing").asString());
	if(id.notNull()) overrides["3da1d753-028a-5446-24f3-9c9b856d9422"] = id;
	id = LLUUID(floater->childGetValue("line_flying_slow").asString());
	if(id.notNull()) overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"] = id;
	id = LLUUID(floater->childGetValue("line_sitting_on_ground").asString());
	if(id.notNull()) overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"] = id;
	for(std::list<LLUUID>::iterator itr = LLAO::mStandOverrides.begin();itr != LLAO::mStandOverrides.end();
		itr++)
	{
		overrides["stands"].append((*itr));
	}
	LLSD settings;
	settings["version"] = 2;
	settings["overrides"] = overrides;
	gSavedPerAccountSettings.setLLSD("AO.Settings", settings);
	LLAO::refresh();
	floater->refresh();
}