| 321 | } |
| 322 | |
| 323 | void SampleUI::BuildUIPerformancePresets() |
| 324 | { |
| 325 | if (!ImGui::BeginPopupModal("Performance Preset", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) |
| 326 | return; |
| 327 | |
| 328 | ImGui::Text("Click to select a performance preset:"); |
| 329 | ImGui::Separator(); |
| 330 | |
| 331 | for (const auto& preset : s_performancePresets) |
| 332 | { |
| 333 | bool isCurrent = MatchesPreset(m_ui, preset); |
| 334 | std::string displayLabel = std::string(preset.Name) + (isCurrent ? " [current]" : ""); |
| 335 | if (ImGui::Selectable(displayLabel.c_str(), isCurrent)) |
| 336 | { |
| 337 | ApplyPreset(m_ui, preset); |
| 338 | ImGui::CloseCurrentPopup(); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | ImGui::Separator(); |
| 343 | if (ImGui::Button("Cancel", { -1, 0 }) || ImGui::IsKeyPressed(ImGuiKey_Escape)) |
| 344 | ImGui::CloseCurrentPopup(); |
| 345 | |
| 346 | ImGui::EndPopup(); |
| 347 | } |
| 348 | |
| 349 | void SampleUI::DLSSFGSelectorUI() |
| 350 | { |
nothing calls this directly
no test coverage detected