listify two-column tables

excluded are the Q and partyline modules, as they are deprecated. There
are some tables that have more than two columns, but could likely be
easily modified, but this will be attempted at a later time.
This commit is contained in:
girst
2019-05-29 17:41:38 +02:00
parent e528b5f2d6
commit fe8d447a60
12 changed files with 28 additions and 1 deletions
+3 -1
View File
@@ -1999,13 +1999,15 @@ CModCommand::CModCommand(const CString& sCmd, CmdFunc func,
: m_sCmd(sCmd), m_pFunc(std::move(func)), m_Args(Args), m_Desc(Desc) {}
void CModCommand::InitHelp(CTable& Table) {
Table.SetStyle(CTable::ListStyle);
Table.AddColumn(t_s("Command", "modhelpcmd"));
Table.AddColumn(t_s("Description", "modhelpcmd"));
}
void CModCommand::AddHelp(CTable& Table) const {
Table.AddRow();
Table.SetCell(t_s("Command", "modhelpcmd"), GetCommand() + " " + GetArgs());
Table.SetCell(t_s("Command", "modhelpcmd"),
GetCommand() + (GetArgs().empty() ? "" : " ") + GetArgs());
Table.SetCell(t_s("Description", "modhelpcmd"), GetDescription());
}