MCPcopy Create free account
hub / github.com/EasyRPG/Player / DrawLine

Method DrawLine

src/window_stringview.cpp:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void Window_StringView::DrawLine(int index) {
171 Rect rect = GetItemRect(index + GetReservedLineCount());
172 //contents->ClearRect(rect);
173
174 std::string line = lines[index];
175
176 if (!line.empty()) {
177 if (line_numbers[index]) {
178 contents->TextDraw(rect.x, rect.y, Font::ColorDisabled, fmt::format("{:0" + std::to_string(line_no_max_digits) + "d}", line_numbers[index]));
179 }
180 contents->TextDraw(rect.x + line_no_max_digits * 6 + 6, rect.y, Font::ColorDefault, line);
181 }
182}

Callers

nothing calls this directly

Calls 2

TextDrawMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected