MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / InputWidget_FormatLine

Function InputWidget_FormatLine

src/Widgets.c:1113–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113static void InputWidget_FormatLine(struct InputWidget* w, int i, cc_string* line) {
1114 cc_string src = w->lines[i];
1115 if (!w->convertPercents) { String_AppendString(line, &src); return; }
1116
1117 for (i = 0; i < src.length; i++) {
1118 char c = src.buffer[i];
1119 if (c == '%' && Drawer2D_ValidColorCodeAt(&src, i + 1)) { c = '&'; }
1120 String_Append(line, c);
1121 }
1122}
1123
1124static void InputWidget_CalculateLineSizes(struct InputWidget* w) {
1125 cc_string line; char lineBuffer[STRING_SIZE];

Callers 5

InputWidget_GetLastColFunction · 0.85
InputWidget_UpdateCaretFunction · 0.85
InputWidget_PointerDownFunction · 0.85

Calls 3

String_AppendStringFunction · 0.85
String_AppendFunction · 0.85

Tested by

no test coverage detected