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

Method createTooltip

source/frontend/StarStatusPane.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29PanePtr StatusPane::createTooltip(Vec2I const& screenPosition) {
30 auto interfaceScale = m_guiContext->interfaceScale();
31 for (auto const& indicator : m_statusIndicators) {
32 if (indicator.screenRect.contains(Vec2F(screenPosition * interfaceScale))) {
33 if (!indicator.label.empty())
34 return SimpleTooltipBuilder::buildTooltip(indicator.label);
35 }
36 }
37 return {};
38}
39
40void StatusPane::renderImpl() {
41 Pane::renderImpl();

Callers

nothing calls this directly

Calls 3

interfaceScaleMethod · 0.45
containsMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected