| 78 | } |
| 79 | |
| 80 | void GenericMessageDialog::processYesNo() |
| 81 | { |
| 82 | if (!_sizeInitialized) { |
| 83 | auto size = ImGui::GetWindowSize(); |
| 84 | auto factor = WindowController::get().getContentScaleFactor() / WindowController::get().getLastContentScaleFactor(); |
| 85 | ImGui::SetWindowSize({size.x * factor, size.y * factor}); |
| 86 | _sizeInitialized = true; |
| 87 | } |
| 88 | |
| 89 | ImGui::TextWrapped("%s", _message.c_str()); |
| 90 | |
| 91 | ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)}); |
| 92 | AlienImGui::Separator(); |
| 93 | |
| 94 | if (AlienImGui::Button("Yes")) { |
| 95 | close(); |
| 96 | _execFunction(); |
| 97 | } |
| 98 | ImGui::SameLine(); |
| 99 | if (AlienImGui::Button("No")) { |
| 100 | close(); |
| 101 | } |
| 102 | } |
nothing calls this directly
no test coverage detected