| 80 | } |
| 81 | |
| 82 | void Window_Command::ReplaceCommands(std::vector<std::string> in_commands) { |
| 83 | commands = std::move(in_commands); |
| 84 | commands_enabled.clear(); |
| 85 | commands_enabled.resize(commands.size(), true); |
| 86 | index = 0; |
| 87 | item_max = commands.size(); |
| 88 | const int num_contents = item_max > 0 ? item_max : 1; |
| 89 | SetContents(Bitmap::Create(this->width - 16, num_contents * menu_item_height)); |
| 90 | SetTopRow(0); |
| 91 | |
| 92 | Refresh(); |
| 93 | } |
no test coverage detected