| 8 | #include <zwidget/widgets/scrollbar/scrollbar.h> |
| 9 | |
| 10 | bool ErrorWindow::ExecModal(const std::string& text, const std::string& log) |
| 11 | { |
| 12 | Size screenSize = GetScreenSize(); |
| 13 | double windowWidth = 1200.0; |
| 14 | double windowHeight = 700.0; |
| 15 | |
| 16 | auto window = std::make_unique<ErrorWindow>(); |
| 17 | window->SetText(text, log); |
| 18 | window->SetFrameGeometry((screenSize.width - windowWidth) * 0.5, (screenSize.height - windowHeight) * 0.5, windowWidth, windowHeight); |
| 19 | window->Show(); |
| 20 | |
| 21 | DisplayWindow::RunLoop(); |
| 22 | |
| 23 | return window->Restart; |
| 24 | } |
| 25 | |
| 26 | ErrorWindow::ErrorWindow() : Widget(nullptr, WidgetType::Window) |
| 27 | { |
nothing calls this directly
no test coverage detected