Example #1
0
void InternalLink::showPrompt(DesuraId id, Args args)
{
	std::string prompt = args.getArgValue("prompt");
	UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo( id );

	if (prompt == "update")
	{
		std::vector<std::string> a;
		a.push_back("reminder=true");

		showUpdateForm(id, Args(a));
	}
	else if (prompt == "launch")
	{
		LaunchItemDialog* form = new LaunchItemDialog(m_pParent);
		regForm(id, form);

		form->setInfo(item);

		form->Show(true);
		form->Raise();
	}
	else if (prompt == "eula")
	{
		showEULA(id);
	}
	else if (prompt == "preload")
	{
		showPreorderPrompt(id, true);
	}
}
Example #2
0
void InternalLink::showPrompt(DesuraId id, LinkArgs args)
{
	std::string prompt = args.getArgValue("prompt");
	gcRefPtr<UserCore::Item::ItemInfoI> item = GetUserCore()->getItemManager()->findItemInfo( id );

	if (prompt == "update")
	{
		args.push_back("reminder=true");
		showUpdateForm(id, args);
	}
	else if (prompt == "launch")
	{
		LaunchItemDialog* form = new LaunchItemDialog(m_pParent);
		regForm(id, form);

		form->setInfo(item);

		form->Show(true);
		form->Raise();
	}
	else if (prompt == "eula")
	{
		showEULA(id);
	}
	else if (prompt == "preload")
	{
		showPreorderPrompt(id, true);
	}
	else if (prompt == "needtorunfirst")
	{
		std::string parentId = args.getArgValue("parentid");

		DesuraId pid(parentId.c_str(), "games");
		showNeedToRun(id, pid);
	}
	else
	{
		gcAssert(false);
	}
}