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

Function OutputString

plugins/uicommon.h:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67typedef int8_t UIColor;
68
69static inline void OutputString(UIColor color, int &x, int &y, const std::string &text,
70 bool newline = false, int left_margin = 0, const UIColor bg_color = 0, bool map = false)
71{
72 Screen::paintString(Screen::Pen(' ', color, bg_color), x, y, text, map);
73 if (newline)
74 {
75 ++y;
76 x = left_margin;
77 }
78 else
79 x += text.length();
80}
81
82static inline void OutputHotkeyString(int &x, int &y, const char *text, const char *hotkey, bool newline = false,
83 int left_margin = 0, int8_t text_color = COLOR_WHITE, int8_t hotkey_color = COLOR_LIGHTGREEN, bool map = false)

Callers 10

OutputHotkeyStringFunction · 0.85
OutputLabelStringFunction · 0.85
OutputFilterStringFunction · 0.85
OutputToggleStringFunction · 0.85
displayMethod · 0.85
renderMethod · 0.85
renderMethod · 0.85
renderMethod · 0.85

Calls 2

lengthMethod · 0.80
PenClass · 0.50

Tested by

no test coverage detected