コード例 #1
0
// static
void LLPreviewTexture::onSaveAsBtn(LLUICtrl* ctrl, void* data)
{
	LLPreviewTexture* self = (LLPreviewTexture*)data;
	std::string value = ctrl->getValue().asString();
	if (value == "format_png")
	{
		self->saveAs(LLPreviewTexture::FORMAT_PNG);
	}
	else if (value == "format_tga")
	{
		self->saveAs(LLPreviewTexture::FORMAT_TGA);
	}
	else
	{
		// <FS:PP> Allow to use user-defined default save format for textures
		// self->saveAs(LLPreviewTexture::FORMAT_TGA);
		if (!gSavedSettings.getBOOL("FSTextureDefaultSaveAsFormat"))
		{
			self->saveAs(LLPreviewTexture::FORMAT_TGA);
		}
		else
		{
			self->saveAs(LLPreviewTexture::FORMAT_PNG);
		}
		// </FS:PP>
	}
}
コード例 #2
0
// static
void LLPreviewTexture::onSaveAsBtn(void* data)
{
	LLPreviewTexture* self = (LLPreviewTexture*)data;
	self->saveAs();
}