MCPcopy Create free account
hub / github.com/crawl/crawl / _add_command

Function _add_command

crawl-ref/source/command.cc:612–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612static void _add_command(column_composer &cols, const int column,
613 const command_type cmd,
614 const string &desc,
615 const unsigned int space_to_colon = 7)
616{
617 string command_name = command_to_string(cmd);
618 if (strcmp(command_name.c_str(), "<") == 0)
619 command_name += "<";
620
621 const int cmd_len = strwidth(command_name);
622 string line = "<w>" + command_name + "</w>";
623 for (unsigned int i = cmd_len; i < space_to_colon; ++i)
624 line += " ";
625 line += ": " + untag_tiles_console(desc) + "\n";
626
627 cols.add_formatted(
628 column,
629 line.c_str(),
630 false);
631}
632
633static void _add_insert_commands(column_composer &cols, const int column,
634 const unsigned int space_to_colon,

Callers 3

_add_insert_commandsFunction · 0.85
_add_formatted_keyhelpFunction · 0.85

Calls 4

command_to_stringFunction · 0.85
strwidthFunction · 0.85
untag_tiles_consoleFunction · 0.85
add_formattedMethod · 0.80

Tested by

no test coverage detected