blob: 4a7a58ef3b05cbdc5540fbe83edc1c6dd2e9d496 [file] [log] [blame] [edit]
#include "rive/text/text_interface.hpp"
#include "rive/text/text_input.hpp"
#include "rive/text/text.hpp"
using namespace rive;
TextInterface* TextInterface::from(Core* component)
{
if (component == nullptr)
{
return nullptr;
}
switch (component->coreType())
{
case Text::typeKey:
return component->as<Text>();
break;
case TextInput::typeKey:
return component->as<TextInput>();
break;
}
return nullptr;
}