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

Method SetText

source/common/widgets/errorwindow.cpp:48–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void ErrorWindow::SetText(const std::string& text, const std::string& log)
49{
50 LogView->SetText(text, log);
51
52 clipboardtext.clear();
53 clipboardtext.reserve(log.size() + text.size() + 100);
54
55 // Strip the color escapes from the log
56 const uint8_t* cptr = (const uint8_t*)log.data();
57 while (int chr = GetCharFromString(cptr))
58 {
59 if (chr != TEXTCOLOR_ESCAPE)
60 {
61 // The bar characters, most commonly used to indicate map changes
62 if (chr >= 0x1D && chr <= 0x1F)
63 {
64 chr = 0x2550; // Box Drawings Double Horizontal
65 }
66 clipboardtext += MakeUTF8(chr);
67 }
68 }
69
70 clipboardtext += "\nExecution could not continue.\n";
71 clipboardtext += text;
72 clipboardtext += "\n";
73}
74
75void ErrorWindow::OnClipboardButtonClicked()
76{

Callers 9

UpdateLanguageMethod · 0.45
UpdateLanguageMethod · 0.45
UpdateLanguageMethod · 0.45
UpdateLanguageMethod · 0.45
NetStartWindowMethod · 0.45
SetMessageMethod · 0.45
SetProgressMethod · 0.45
ExecModalMethod · 0.45
ErrorWindowMethod · 0.45

Calls 12

MakeUTF8Function · 0.85
SetRangesMethod · 0.80
GetCharFromStringFunction · 0.50
clearMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
findMethod · 0.45
push_backMethod · 0.45
AddTextMethod · 0.45
ClearMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected