| 1403 | } |
| 1404 | |
| 1405 | void CHud::UpdateMovementInformationTextContainer(STextContainerIndex &TextContainer, float FontSize, float Value, float &PrevValue) |
| 1406 | { |
| 1407 | Value = std::round(Value * 100.0f) / 100.0f; // Round to 2dp |
| 1408 | if(TextContainer.Valid() && PrevValue == Value) |
| 1409 | return; |
| 1410 | PrevValue = Value; |
| 1411 | |
| 1412 | char aBuf[128]; |
| 1413 | str_format(aBuf, sizeof(aBuf), "%.2f", Value); |
| 1414 | |
| 1415 | CTextCursor Cursor; |
| 1416 | Cursor.m_FontSize = FontSize; |
| 1417 | TextRender()->RecreateTextContainer(TextContainer, &Cursor, aBuf); |
| 1418 | } |
| 1419 | |
| 1420 | void CHud::RenderMovementInformationTextContainer(STextContainerIndex &TextContainer, const ColorRGBA &Color, float X, float Y) |
| 1421 | { |
nothing calls this directly
no test coverage detected