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

Method drawBubbleText

source/frontend/StarChatBubbleManager.cpp:334–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void ChatBubbleManager::drawBubbleText(Vec2F screenPos, BubbleText const& bubbleText, int pixelRatio, int alpha, bool isPortrait) {
335 TextStyle style = get<1>(bubbleText);
336 style.color[3] *= ((float)alpha / 255.f);
337 m_guiContext->setTextStyle(style, m_zoom);
338 auto offset = get<3>(bubbleText) * pixelRatio;
339 TextPositioning tp = isPortrait ? m_portraitTextTemplate : m_textTemplate;
340 tp.pos = screenPos + offset;
341 m_guiContext->renderText(get<0>(bubbleText), tp);
342}
343
344}

Callers

nothing calls this directly

Calls 2

setTextStyleMethod · 0.80
renderTextMethod · 0.45

Tested by

no test coverage detected