diff --git a/src/graphics/components/ComponentBuilder.cpp b/src/graphics/components/ComponentBuilder.cpp index ec2710167fd74de043baafabb45ecafaf7e56a8b..015140982b2f59a39aa6290dc54d6614fd2eec32 100644 --- a/src/graphics/components/ComponentBuilder.cpp +++ b/src/graphics/components/ComponentBuilder.cpp @@ -15,7 +15,8 @@ const std::unordered_map<std::string, std::shared_ptr<Element>> ComponentBuilder {"br", std::make_shared<DIVElement>()}, {"strong", std::make_shared<STRONGElement>()}, {"input", std::make_shared<INPUTElement>()}, - {"b", std::make_shared<STRONGElement>()} + {"b", std::make_shared<STRONGElement>()}, + {"i", std::make_shared<SPANElement>()} }; std::shared_ptr<Component> ComponentBuilder::build(const std::shared_ptr<Node> node, const std::shared_ptr<Component> &parentComponent, int windowWidth, int windowHeight) { @@ -116,6 +117,7 @@ std::shared_ptr<Component> ComponentBuilder::build(const std::shared_ptr<Node> n // these aren't used in any elements yet #include "DocumentComponent.h" #include "TabbedComponent.h" +#include "AnimeComponent.h" std::string typeOfComponent(const std::shared_ptr<Component> &component) { TabbedComponent *tabComponent = dynamic_cast<TabbedComponent*>(component.get()); @@ -126,6 +128,8 @@ std::string typeOfComponent(const std::shared_ptr<Component> &component) { if (textComponent) return "text"; InputComponent *inputComponent = dynamic_cast<InputComponent*>(component.get()); if (inputComponent) return "input"; + AnimeComponent *animeComponent = dynamic_cast<AnimeComponent*>(component.get()); + if (animeComponent) return "anime"; BoxComponent *boxComponent = dynamic_cast<BoxComponent*>(component.get()); if (boxComponent) return "box"; return "";