MCPcopy Create free account
hub / github.com/MyGUI/mygui / onKeyButtonPressed

Method onKeyButtonPressed

MyGUIEngine/src/MyGUI_ComboBox.cpp:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

isCaptureMouseMethod · 0.80

Tested by

no test coverage detected