| 322 | */ |
| 323 | |
| 324 | void Console::Layout() |
| 325 | { |
| 326 | unsigned int lineHeight = m_defaultFont->GetSizeInfo(m_characterSize).lineHeight; |
| 327 | |
| 328 | Ndk::NodeComponent& inputNode = m_input->GetComponent<Ndk::NodeComponent>(); |
| 329 | inputNode.SetPosition(0.f, m_size.y - lineHeight - 5.f); |
| 330 | |
| 331 | float historyHeight = m_size.y - lineHeight - 5.f - 2.f; |
| 332 | m_historyBackgroundSprite->SetSize(m_size.x, historyHeight); |
| 333 | |
| 334 | m_maxHistoryLines = static_cast<unsigned int>(std::ceil(historyHeight / lineHeight)); |
| 335 | |
| 336 | Ndk::NodeComponent& historyNode = m_history->GetComponent<Ndk::NodeComponent>(); |
| 337 | historyNode.SetPosition(0.f, historyHeight - m_maxHistoryLines * lineHeight); |
| 338 | |
| 339 | Ndk::NodeComponent& inputBackgroundNode = m_inputBackground->GetComponent<Ndk::NodeComponent>(); |
| 340 | inputBackgroundNode.SetPosition(0.f, historyHeight + 2.f); |
| 341 | |
| 342 | m_inputBackgroundSprite->SetSize(m_size.x, m_size.y - historyHeight); |
| 343 | } |
| 344 | |
| 345 | /*! |
| 346 | * \brief Refreshes the history of the console |
nothing calls this directly
no test coverage detected