* Adds a bunch of controls to the list. * @param keys List of controls. */
| 150 | * @param keys List of controls. |
| 151 | */ |
| 152 | void OptionsControlsState::addControls(const std::vector<OptionInfo> &keys) |
| 153 | { |
| 154 | for (std::vector<OptionInfo>::const_iterator i = keys.begin(); i != keys.end(); ++i) |
| 155 | { |
| 156 | std::wstring name = tr(i->description()); |
| 157 | SDLKey *key = i->asKey(); |
| 158 | std::wstring keyName = Language::utf8ToWstr(ucWords(SDL_GetKeyName(*key))); |
| 159 | if (*key == SDLK_UNKNOWN) |
| 160 | keyName = L""; |
| 161 | _lstControls->addRow(2, name.c_str(), keyName.c_str()); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Gets the currently selected control. |
nothing calls this directly
no test coverage detected