Currently, when text is written onto the screen, it is done so by calling Simple2D::Ui::createText. This function will read an std::string and create a series of Simple2D::RenderableUiElements, which represent each letter of the given string. Every frame all of these Simple2D::RenderableUiElements will be deleted in Simple2D::UiManager::renderAll just to be recreated in any Behavior::update.
This shouldn't happen for text which hasn't changed. And text which did change should use a minimal amount of deleting and recreating of Simple2D::RenderableUiElements.
Currently, when text is written onto the screen, it is done so by calling
Simple2D::Ui::createText. This function will read anstd::stringand create a series ofSimple2D::RenderableUiElements, which represent each letter of the given string. Every frame all of theseSimple2D::RenderableUiElements will be deleted inSimple2D::UiManager::renderAlljust to be recreated in anyBehavior::update.This shouldn't happen for text which hasn't changed. And text which did change should use a minimal amount of deleting and recreating of
Simple2D::RenderableUiElements.