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

Method DrawCmdLines

src/window_stringview.cpp:146–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void Window_StringView::DrawCmdLines() {
147 Rect rect = GetItemRect(0);
148 contents->ClearRect(rect);
149
150 contents->TextDraw(rect.x, rect.y, Font::ColorHeal, "Automatic line break: ");
151 contents->TextDraw(GetWidth() - 16, rect.y, Font::ColorCritical, auto_linebreak ? "[ON]" : "[OFF]", Text::AlignRight);
152
153 rect = GetItemRect(1);
154 contents->ClearRect(rect);
155
156 contents->TextDraw(rect.x, rect.y, Font::ColorHeal, "Command evaluation: ");
157 contents->TextDraw(GetWidth() - 16, rect.y, Font::ColorCritical, cmd_eval ? "[ON]" : "[OFF]", Text::AlignRight);
158
159#ifdef HAVE_NLOHMANN_JSON
160 if (this->json_data) {
161 rect = GetItemRect(2);
162 contents->ClearRect(rect);
163
164 contents->TextDraw(rect.x, rect.y, Font::ColorHeal, "Pretty Print: ");
165 contents->TextDraw(GetWidth() - 16, rect.y, Font::ColorCritical, pretty_print ? "[ON]" : "[OFF]", Text::AlignRight);
166 }
167#endif
168}
169
170void Window_StringView::DrawLine(int index) {
171 Rect rect = GetItemRect(index + GetReservedLineCount());

Callers

nothing calls this directly

Calls 2

ClearRectMethod · 0.80
TextDrawMethod · 0.80

Tested by

no test coverage detected