Пример #1
0
// static 
void LLAlertDialog::onButtonPressed( void* userdata )
{
	ButtonData* button_data = (ButtonData*)userdata;
	LLAlertDialog* self = button_data->mSelf;

	self->mOptionChosen = button_data->mOption;
	self->close(); // deletes self
}
Пример #2
0
// static 
void LLAlertDialog::onButtonPressed( void* userdata )
{
	ButtonData* button_data = (ButtonData*)userdata;
	LLAlertDialog* self = button_data->mSelf;

	LLSD response = self->mNote->getResponseTemplate();
	if (self->mLineEditor)
	{
		response[self->mLineEditor->getName()] = self->mLineEditor->getValue();
	}
	response[button_data->mButton->getName()] = true;

	// If we declared a URL and chose the URL option, go to the url
	if (!button_data->mURL.empty() && sURLLoader != NULL)
	{
		sURLLoader->load(button_data->mURL);
	}

	self->mNote->respond(response); // new notification reponse
	self->close(); // deletes self
}