MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / AddLine

Method AddLine

Source/GUI/widgetframework.cpp:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void NativeLoadingText::AddLine(const char* msg) {
40 buf_mutex.lock();
41 // Shift all lines up
42 for (int i = kMaxLines * kMaxCharPerLine - 1, index = (kMaxLines - 1) * kMaxCharPerLine - 1;
43 i >= kMaxCharPerLine;) {
44 buf[i--] = buf[index--];
45 }
46 // Add new line
47 snprintf(buf, kMaxCharPerLine, "%s", msg);
48 buf_mutex.unlock();
49}
50
51void NativeLoadingText::Clear() {
52 buf_mutex.lock();

Callers 15

DrawMethod · 0.45
DrawMethod · 0.45
DrawBoxFunction · 0.45
DrawControlledFaceFunction · 0.45
DrawMethod · 0.45
GetRotationFunction · 0.45
DrawRiggedObjectMethod · 0.45
DrawBoneConnectUIMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected