| 24 | } |
| 25 | |
| 26 | ErrorWindow::ErrorWindow() : Widget(nullptr, WidgetType::Window) |
| 27 | { |
| 28 | FStringf caption("Fatal Error - " GAMENAME " %s (%s)", GetVersionString(), GetGitTime()); |
| 29 | SetWindowTitle(caption.GetChars()); |
| 30 | SetWindowBackground(Colorf::fromRgba8(51, 51, 51)); |
| 31 | SetWindowBorderColor(Colorf::fromRgba8(51, 51, 51)); |
| 32 | SetWindowCaptionColor(Colorf::fromRgba8(33, 33, 33)); |
| 33 | SetWindowCaptionTextColor(Colorf::fromRgba8(226, 223, 219)); |
| 34 | |
| 35 | LogView = new LogViewer(this); |
| 36 | ClipboardButton = new PushButton(this); |
| 37 | RestartButton = new PushButton(this); |
| 38 | |
| 39 | ClipboardButton->OnClick = [=]() { OnClipboardButtonClicked(); }; |
| 40 | RestartButton->OnClick = [=]() { OnRestartButtonClicked(); }; |
| 41 | |
| 42 | ClipboardButton->SetText("Copy to clipboard"); |
| 43 | RestartButton->SetText("Restart"); |
| 44 | |
| 45 | LogView->SetFocus(); |
| 46 | } |
| 47 | |
| 48 | void ErrorWindow::SetText(const std::string& text, const std::string& log) |
| 49 | { |
nothing calls this directly
no test coverage detected