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

Method createTooltip

source/frontend/StarQuestInterface.cpp:175–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175PanePtr 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
188WidgetPtr QuestLogInterface::getSelected() {
189 auto mainQuestList = fetchChild<ListWidget>("scrollArea.verticalLayout.mainQuestList");

Callers

nothing calls this directly

Calls 2

itemMethod · 0.45
itemAtMethod · 0.45

Tested by

no test coverage detected