| 458 | } |
| 459 | |
| 460 | void InGameMenu::DrawTexture(const Texture& texture, float x, float y, std::uint16_t z, Alignment align, Vector2f size, const Colorf& color, bool unaligned) |
| 461 | { |
| 462 | Canvas* currentCanvas = GetActiveCanvas(); |
| 463 | Vector2f adjustedPos = Canvas::ApplyAlignment(align, Vector2f(x, y), size); |
| 464 | if (!unaligned) { |
| 465 | adjustedPos.X = std::round(adjustedPos.X); |
| 466 | adjustedPos.Y = std::round(adjustedPos.Y); |
| 467 | } |
| 468 | |
| 469 | currentCanvas->DrawTexture(texture, adjustedPos, z, size, Vector4f(1.0f, 0.0f, 1.0f, 0.0f), color); |
| 470 | } |
| 471 | |
| 472 | Vector2f InGameMenu::MeasureString(StringView text, float scale, float charSpacing, float lineSpacing) |
| 473 | { |