Add SetLocale action

This commit is contained in:
SweetId
2023-10-21 16:43:57 -04:00
parent e3c0f72d53
commit 71f257d1ed
5 changed files with 50 additions and 3 deletions

View File

@@ -12,4 +12,29 @@ namespace Nz
public:
void Execute() override;
};
class NAZARAEDITOR_CORE_API EditorAction_SetLocale final
: public EditorAction
{
public:
EditorAction_SetLocale(const Properties& properties, std::string_view locale)
: EditorAction(properties)
, m_locale(locale)
{}
EditorAction_SetLocale(const std::shared_ptr<Properties>& properties, std::string_view locale)
: EditorAction(properties)
, m_locale(locale)
{}
~EditorAction_SetLocale() = default;
std::unique_ptr<EditorAction> Clone() const override { return std::make_unique<EditorAction_SetLocale>(m_properties, m_locale); }
const std::string& GetName() const override { return m_properties->className; }
bool IsUndoRedoable() const override { return false; }
static const char* GetClassName() { return "EditorAction_SetLocale"; }
void Execute() override;
protected:
std::string m_locale;
};
}

View File

@@ -8,6 +8,8 @@ namespace NzEditor
: public Nz::EditorBaseApplication
{
public:
Application();
virtual bool NewLevel() override;
};
}