MCPcopy Create free account
hub / github.com/ZDoom/Raze / ErrorWindow

Method ErrorWindow

source/common/widgets/errorwindow.cpp:26–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26ErrorWindow::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
48void ErrorWindow::SetText(const std::string& text, const std::string& log)
49{

Callers

nothing calls this directly

Calls 5

GetVersionStringFunction · 0.85
GetGitTimeFunction · 0.85
SetFocusMethod · 0.80
GetCharsMethod · 0.45
SetTextMethod · 0.45

Tested by

no test coverage detected