commands separated
[k8-i-v-a-n.git] / src / game / commands / ShowKeyLayout.cpp
blob140dd6017f0a6fb81b49bffcd0e186e3e5885f27
1 COMMAND(ShowKeyLayout) {
2 festring Buffer;
3 command *cmd;
4 //
5 felist List(CONST_S("Keyboard Layout"));
6 List.AddDescription(CONST_S(""));
7 List.AddDescription(CONST_S("Key Description"));
8 for (int c = 0; (cmd = commandsystem::GetCommand(c)); ++c) {
9 if (!cmd->IsWizardModeFunction()) {
10 Buffer.Empty();
11 Buffer << cmd->GetKey();
12 Buffer.Resize(10);
13 List.AddEntry(Buffer+cmd->GetDescription(), LIGHT_GRAY);
16 if (game::WizardModeIsActive()) {
17 List.AddEntry(CONST_S(""), WHITE);
18 List.AddEntry(CONST_S("Wizard mode functions:"), WHITE);
19 List.AddEntry(CONST_S(""), WHITE);
20 for (int c = 0; (cmd = commandsystem::GetCommand(c)); ++c) {
21 if (cmd->IsWizardModeFunction()) {
22 Buffer.Empty();
23 Buffer << cmd->GetKey();
24 Buffer.Resize(10);
25 List.AddEntry(Buffer+cmd->GetDescription(), LIGHT_GRAY);
29 game::SetStandardListAttributes(List);
30 List.Draw();
31 return false;