MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / formatErrorString

Function formatErrorString

src/OpenLoco/src/Ui/Windows/Error.cpp:63–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 static char* formatErrorString(StringId title, StringId message, FormatArguments args, char* buffer)
64 {
65 char* ptr = buffer;
66 ptr[0] = ControlCodes::Colour::white;
67 ptr++;
68
69 if (title != StringIds::null)
70 {
71 ptr = StringManager::formatString(ptr, title, args);
72 }
73
74 if (message != StringIds::null)
75 {
76 if (title != StringIds::null)
77 {
78
79 *ptr = ControlCodes::newline;
80 ptr++;
81 }
82 StringManager::formatString(ptr, message, args);
83 }
84
85 return ptr;
86 }
87
88 static void createErrorWindow(StringId title, StringId message, bool suppressErrorSound)
89 {

Callers 1

createErrorWindowFunction · 0.85

Calls 1

formatStringFunction · 0.85

Tested by

no test coverage detected