| 278 | |
| 279 | |
| 280 | tString Viewer::DoSubFolder() |
| 281 | { |
| 282 | // Output sub-folder. |
| 283 | Config::ProfileData& profile = Config::GetProfileData(); |
| 284 | char subFolder[256]; tMemset(subFolder, 0, 256); |
| 285 | tStrncpy(subFolder, profile.SaveSubFolder.Chr(), 255); |
| 286 | |
| 287 | float itemWidth = Gutil::GetUIParamScaled(160.0f, 2.5f); |
| 288 | float buttonWidth = Gutil::GetUIParamScaled(76.0f, 2.5f); |
| 289 | |
| 290 | ImGui::SetNextItemWidth(itemWidth); |
| 291 | ImGui::InputText("SubFolder", subFolder, 256); |
| 292 | profile.SaveSubFolder.Set(subFolder); |
| 293 | tString destDir = ImagesDir; |
| 294 | if (!profile.SaveSubFolder.IsEmpty()) |
| 295 | destDir += profile.SaveSubFolder + "/"; |
| 296 | tString toolTipText; |
| 297 | tsPrintf(toolTipText, "Save to %s", destDir.Chr()); |
| 298 | Gutil::ToolTip(toolTipText.Chr()); |
| 299 | |
| 300 | if (ImGui::Button("Default", tVector2(buttonWidth, 0.0f))) |
| 301 | profile.SaveSubFolder.Set("Saved"); |
| 302 | ImGui::SameLine(); |
| 303 | if (ImGui::Button("Here", tVector2(buttonWidth, 0.0f))) |
| 304 | profile.SaveSubFolder.Clear(); |
| 305 | |
| 306 | return destDir; |
| 307 | } |
| 308 | |
| 309 | |
| 310 | tSystem::tFileType Viewer::DoSaveChooseFiletype() |