add const char* ctor

This commit is contained in:
SweetId 2023-10-21 09:29:50 -04:00
parent c96e1c224d
commit 44ab06efbe
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,7 @@ namespace Nz
public:
LocalizedText();
LocalizedText(std::string_view str);
LocalizedText(const char* str);
template <typename T> LocalizedText& Arg(T&& v)
{

View File

@ -16,6 +16,10 @@ namespace Nz
, m_locale(nullptr)
{}
LocalizedText::LocalizedText(const char* str)
: LocalizedText(std::string_view{ str })
{}
void LocalizedText::Update() const
{
if (m_locale != Nz::Localization::Instance()->m_currentLocale)