| 46 | } |
| 47 | |
| 48 | void ListBoxDataControl::notifyListChangePosition(MyGUI::ListBox* _sender, size_t _index) |
| 49 | { |
| 50 | if (mLastIndex != MyGUI::ITEM_NONE && _index != MyGUI::ITEM_NONE) |
| 51 | { |
| 52 | if (MyGUI::InputManager::getInstance().isControlPressed()) |
| 53 | { |
| 54 | if (mEnableChangePosition) |
| 55 | { |
| 56 | DataPtr data1 = *mListBox->getItemDataAt<DataPtr>(mLastIndex); |
| 57 | DataPtr data2 = *mListBox->getItemDataAt<DataPtr>(_index); |
| 58 | eventChangePosition(data1, data2); |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | mLastIndex = _index; |
| 64 | |
| 65 | DataPtr selection = _index != MyGUI::ITEM_NONE ? *mListBox->getItemDataAt<DataPtr>(_index) : nullptr; |
| 66 | DataSelectorManager::getInstance().changeParentSelection(mParentData, selection); |
| 67 | } |
| 68 | |
| 69 | void ListBoxDataControl::invalidateList() |
| 70 | { |
nothing calls this directly
no test coverage detected