* Changes the list of available options to choose from. * @param options List of string IDs. */
| 271 | * @param options List of string IDs. |
| 272 | */ |
| 273 | void ComboBox::setOptions(const std::vector<std::string> &options) |
| 274 | { |
| 275 | setDropdown(options.size()); |
| 276 | _list->clearList(); |
| 277 | for (std::vector<std::string>::const_iterator i = options.begin(); i != options.end(); ++i) |
| 278 | { |
| 279 | _list->addRow(1, _lang->getString(*i).c_str()); |
| 280 | } |
| 281 | setSelected(_sel); |
| 282 | _list->draw(); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Changes the list of available options to choose from. |