Beispiel #1
0
void LLPanelProfile::onOpen(const LLSD& key)
{
	getTabContainer()[PANEL_PICKS]->onOpen(getAvatarId());

	// support commands to open further pieces of UI
	if (key.has("show_tab_panel"))
	{
		std::string panel = key["show_tab_panel"].asString();
		if (panel == "create_classified")
		{
			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
			if (picks)
			{
				picks->createNewClassified();
			}
		}
		else if (panel == "classified_details")
		{
			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
			if (picks)
			{
				LLSD params = key;
				params.erase("show_tab_panel");
				params.erase("open_tab_name");
				picks->openClassifiedInfo(params);
			}
		}
		else if (panel == "edit_classified")
		{
			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
			if (picks)
			{
				LLSD params = key;
				params.erase("show_tab_panel");
				params.erase("open_tab_name");
				picks->openClassifiedEdit(params);
			}
		}
		else if (panel == "create_pick")
		{
			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
			if (picks)
			{
				picks->createNewPick();
			}
		}
		else if (panel == "edit_pick")
		{
			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
			if (picks)
			{
				LLSD params = key;
				params.erase("show_tab_panel");
				params.erase("open_tab_name");
				picks->openPickEdit(params);
			}
		}
	}
}
Beispiel #2
0
	void createPick()
	{
		// open the new pick panel on the Picks floater
		LLFloater* picks_floater = LLFloaterReg::showInstance("picks");

		LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
		if (picks)
		{
			picks->createNewPick();
		}
	}