--------------------------------- TextRenderer::DrawText Creates a text cache and adds it to the active font
| 136 | // Creates a text cache and adds it to the active font |
| 137 | // |
| 138 | void TextRenderer::DrawText(std::string const& text, vec2 const pos, int16 fontSize) |
| 139 | { |
| 140 | ET_ASSERT(m_QueuedFonts.size() > 0u, "No active font set!"); |
| 141 | |
| 142 | if (fontSize <= 0) |
| 143 | { |
| 144 | fontSize = m_QueuedFonts[m_ActiveFontIdx].m_Font->GetFontSize(); |
| 145 | } |
| 146 | |
| 147 | m_NumCharacters += static_cast<uint32>(text.size()); |
| 148 | m_QueuedFonts[m_ActiveFontIdx].m_TextCache.emplace_back(TextCache(text, pos, m_Color, fontSize)); |
| 149 | m_QueuedFonts[m_ActiveFontIdx].m_IsAddedToRenderer = true; |
| 150 | } |
| 151 | |
| 152 | //--------------------------------- |
| 153 | // TextRenderer::OnWindowResize |
no test coverage detected