* Change selected control. * @param action Pointer to an action. */
| 237 | * @param action Pointer to an action. |
| 238 | */ |
| 239 | void OptionsControlsState::lstControlsKeyPress(Action *action) |
| 240 | { |
| 241 | if (_selected != -1) |
| 242 | { |
| 243 | SDLKey key = action->getDetails()->key.keysym.sym; |
| 244 | if (key != 0) |
| 245 | { |
| 246 | *_selKey->asKey() = key; |
| 247 | std::wstring name = Language::utf8ToWstr(ucWords(SDL_GetKeyName(*_selKey->asKey()))); |
| 248 | _lstControls->setCellText(_selected, 1, name); |
| 249 | } |
| 250 | _lstControls->setCellColor(_selected, 0, _colorNormal); |
| 251 | _lstControls->setCellColor(_selected, 1, _colorNormal); |
| 252 | _selected = -1; |
| 253 | _selKey = 0; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | } |
nothing calls this directly
no test coverage detected