// 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> } }
// static void LLPreviewTexture::onSaveAsBtn(void* data) { LLPreviewTexture* self = (LLPreviewTexture*)data; self->saveAs(); }