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

Method renderText

source/windowing/StarCanvasWidget.cpp:270–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void CanvasWidget::renderText(Vec2F const& renderingOffset, String const& s, TextPositioning const& position, TextStyle const& style) {
271 auto& context = GuiContext::singleton();
272 context.setTextStyle(style, m_ignoreInterfaceScale ? 1 : context.interfaceScale());
273
274 TextPositioning translatedPosition = position;
275 translatedPosition.pos += renderingOffset;
276 if (m_ignoreInterfaceScale)
277 context.renderText(s, translatedPosition);
278 else
279 context.renderInterfaceText(s, translatedPosition);
280
281 context.clearTextStyle();
282}
283
284}

Callers

nothing calls this directly

Calls 5

singletonClass · 0.85
setTextStyleMethod · 0.80
renderInterfaceTextMethod · 0.80
interfaceScaleMethod · 0.45
clearTextStyleMethod · 0.45

Tested by

no test coverage detected