| 173 | } |
| 174 | |
| 175 | PanePtr QuestLogInterface::createTooltip(Vec2I const& screenPosition) { |
| 176 | ItemPtr item; |
| 177 | if (auto child = getChildAt(screenPosition)) { |
| 178 | if (auto itemSlot = as<ItemSlotWidget>(child)) |
| 179 | item = itemSlot->item(); |
| 180 | if (auto itemGrid = as<ItemGridWidget>(child)) |
| 181 | item = itemGrid->itemAt(screenPosition); |
| 182 | } |
| 183 | if (item) |
| 184 | return ItemTooltipBuilder::buildItemTooltip(item, m_player); |
| 185 | return {}; |
| 186 | } |
| 187 | |
| 188 | WidgetPtr QuestLogInterface::getSelected() { |
| 189 | auto mainQuestList = fetchChild<ListWidget>("scrollArea.verticalLayout.mainQuestList"); |