MCPcopy Create free account
hub / github.com/DFHack/dfhack / print_text

Method print_text

library/Console-posix.cpp:249–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 }
248
249 void print_text(color_ostream::color_value clr, const std::string &chunk)
250 {
251 if(!in_batch && state == con_lineedit)
252 {
253 disable_raw();
254 fprintf(dfout_C,"\x1b[1G");
255 fprintf(dfout_C,"\x1b[0K");
256
257 color(clr);
258 print(chunk.c_str());
259
260 reset_color();
261 enable_raw();
262 prompt_refresh();
263 }
264 else
265 {
266 color(clr);
267 print(chunk.c_str());
268 }
269 }
270
271 void begin_batch()
272 {

Callers 1

add_textMethod · 0.45

Calls 3

c_strMethod · 0.80
colorFunction · 0.50
printFunction · 0.50

Tested by

no test coverage detected