MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / createTooltip

Method createTooltip

source/frontend/StarCraftingInterface.cpp:180–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180PanePtr 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
199EntityId CraftingPane::sourceEntityId() const {
200 return m_sourceEntityId;

Callers

nothing calls this directly

Calls 4

numChildrenMethod · 0.80
itemAtMethod · 0.45
getChildAtMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected