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

Function OutputToggleString

plugins/uicommon.h:124–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124static inline void OutputToggleString(int &x, int &y, const char *text, const char *hotkey, bool state, bool newline = true,
125 int left_margin = 0, int8_t color = COLOR_WHITE, int8_t hotkey_color = COLOR_LIGHTGREEN, bool map = false)
126{
127 OutputHotkeyString(x, y, text, hotkey, false, 0, color, hotkey_color, map);
128 OutputString(color, x, y, ": ", false, 0, 0, map);
129 if (state)
130 OutputString(COLOR_GREEN, x, y, "On", newline, left_margin, 0, map);
131 else
132 OutputString(COLOR_GREY, x, y, "Off", newline, left_margin, 0, map);
133}
134
135static inline void OutputToggleString(int &x, int &y, const char *text, df::interface_key hotkey, bool state, bool newline = true,
136 int left_margin = 0, int8_t color = COLOR_WHITE, int8_t hotkey_color = COLOR_LIGHTGREEN, bool map = false)

Callers

nothing calls this directly

Calls 3

OutputHotkeyStringFunction · 0.85
OutputStringFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected