| 237 | } |
| 238 | |
| 239 | void GuiPopupMenuTextListCtrl::onCellHighlighted(Point2I cell) |
| 240 | { |
| 241 | // If this text list control is part of a submenu, then don't worry about |
| 242 | // passing this along |
| 243 | if (!isSubMenu) |
| 244 | { |
| 245 | RectI globalbounds(getBounds()); |
| 246 | Point2I globalpoint = localToGlobalCoord(globalbounds.point); |
| 247 | globalbounds.point = globalpoint; |
| 248 | } |
| 249 | |
| 250 | S32 selectionIndex = cell.y; |
| 251 | |
| 252 | if (selectionIndex != -1 && mLastHighlightedMenuIdx != selectionIndex) |
| 253 | { |
| 254 | mLastHighlightedMenuIdx = selectionIndex; |
| 255 | |
| 256 | mPopup->hidePopupSubmenus(); |
| 257 | } |
| 258 | |
| 259 | if (selectionIndex != -1) |
| 260 | { |
| 261 | MenuItem *list = &mPopup->mMenuItems[selectionIndex]; |
| 262 | |
| 263 | if (list->mIsSubmenu && list->mSubMenu != nullptr) |
| 264 | { |
| 265 | list->mSubMenu->showPopup(getRoot(), getPosition().x + mCellSize.x, getPosition().y + (selectionIndex * mCellSize.y)); |
| 266 | } |
| 267 | } |
| 268 | } |
nothing calls this directly
no test coverage detected