MCPcopy Create free account
hub / github.com/bluescan/tacentview / DoSaveChooseFiletype

Method DoSaveChooseFiletype

Src/OpenSaveDialogs.cpp:310–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308
309
310tSystem::tFileType Viewer::DoSaveChooseFiletype()
311{
312 Config::ProfileData& profile = Config::GetProfileData();
313 tString fileTypeName = profile.SaveFileType;
314 tFileType fileType = tGetFileTypeFromName(fileTypeName);
315
316 float itemWidth = Gutil::GetUIParamScaled(160.0f, 2.5f);
317 ImGui::SetNextItemWidth(itemWidth);
318 if (ImGui::BeginCombo("File Type", fileTypeName.Chr()))
319 {
320 for (tFileTypes::tFileTypeItem* item = FileTypes_Save.First(); item; item = item->Next())
321 {
322 tFileType ft = item->FileType;
323 bool selected = (ft == fileType);
324
325 tString ftName = tGetFileTypeName(ft);
326 if (ImGui::Selectable(ftName.Chr(), &selected))
327 profile.SaveFileType = ftName;
328
329 if (selected)
330 ImGui::SetItemDefaultFocus();
331 }
332
333 ImGui::EndCombo();
334 }
335 ImGui::SameLine();
336 Gutil::HelpMark("Output image format.\nFull (non-binary) alpha supported by tga, png, apng, bmp, tiff, qoi, and webp.\nAnimation supported by webp, gif, tiff, and apng.");
337
338 return tGetFileTypeFromName(profile.SaveFileType);
339}
340
341
342void Viewer::DoSaveGifOptions(bool multiframeConfigValues)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected