| 145 | } |
| 146 | |
| 147 | void ComboBox::onKeyButtonPressed(KeyCode _key, Char _char) |
| 148 | { |
| 149 | Base::onKeyButtonPressed(_key, _char); |
| 150 | |
| 151 | // при нажатии вниз, показываем лист |
| 152 | if (_key == KeyCode::ArrowDown) |
| 153 | { |
| 154 | // выкидываем список только если мыша свободна |
| 155 | if (!InputManager::getInstance().isCaptureMouse()) |
| 156 | { |
| 157 | showList(); |
| 158 | } |
| 159 | } |
| 160 | // нажат ввод в окне редиктирования |
| 161 | else if ((_key == KeyCode::Return) || (_key == KeyCode::NumpadEnter)) |
| 162 | { |
| 163 | _resetContainer(false); |
| 164 | |
| 165 | eventComboAccept(this, mItemIndex); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | void ComboBox::notifyListMouseItemActivate(ListBox* _widget, size_t _position) |
| 170 | { |
nothing calls this directly
no test coverage detected