| 178 | } |
| 179 | |
| 180 | PanePtr CraftingPane::createTooltip(Vec2I const& screenPosition) { |
| 181 | for (size_t i = 0; i < m_guiList->numChildren(); ++i) { |
| 182 | auto entry = m_guiList->itemAt(i); |
| 183 | if (entry->getChildAt(screenPosition)) { |
| 184 | auto& recipe = m_recipesWidgetMap.getLeft(entry); |
| 185 | return setupTooltip(recipe); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | if (WidgetPtr child = getChildAt(screenPosition)) { |
| 190 | if (child->name() == "btnUpgrade") { |
| 191 | if (m_upgradeRecipe) |
| 192 | return setupTooltip(*m_upgradeRecipe); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | return {}; |
| 197 | } |
| 198 | |
| 199 | EntityId CraftingPane::sourceEntityId() const { |
| 200 | return m_sourceEntityId; |
nothing calls this directly
no test coverage detected