use Nz::LocalizedText instead of std::string for text displayed to users

This commit is contained in:
SweetId
2023-10-20 23:25:53 -04:00
parent 89671593e1
commit 77d4c747ef
12 changed files with 28 additions and 22 deletions

View File

@@ -5,6 +5,7 @@
#include <NazaraEditor/Core/Application/Shortcut.hpp>
#include <Nazara/Renderer.hpp>
#include <NazaraLocalization/LocalizedText.hpp>
#include <memory>
#include <string>
@@ -17,8 +18,8 @@ namespace Nz
struct Properties
{
std::string className;
std::string description;
std::string path;
Nz::LocalizedText description;
Nz::LocalizedText path;
std::string category;
Nz::Shortcut shortcut;

View File

@@ -14,11 +14,12 @@
#include <NazaraEditor/Core/UI/PopupManager.hpp>
#include <NazaraEditor/Core/UI/Window.hpp>
#include <NazaraImgui/NazaraImgui.hpp>
#include <NazaraLocalization/Localization.hpp>
namespace Nz
{
class NAZARAEDITOR_CORE_API EditorBaseApplication
: public Nz::Application<Nz::Graphics, Nz::Imgui, Nz::EditorCore>
: public Nz::Application<Nz::Graphics, Nz::Imgui, Nz::Localization, Nz::EditorCore>
{
public:
NazaraSignal(OnLevelChanged, Nz::Level&);

View File

@@ -8,7 +8,7 @@ namespace Nz
: public EditorWindow
{
public:
EditorMainWindow(EditorBaseApplication* app, const std::string& name = "", const std::vector<std::string>& categories = {});
EditorMainWindow(EditorBaseApplication* app, const Nz::LocalizedText& name, const std::vector<std::string>& categories = {});
virtual ~EditorMainWindow() = default;
protected:

View File

@@ -3,6 +3,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <NazaraEditor/Core/Config.hpp>
#include <NazaraImgui/NazaraImgui.hpp>
#include <NazaraLocalization/LocalizedText.hpp>
namespace Nz
{
@@ -14,7 +15,7 @@ namespace Nz
: private Nz::ImguiHandler
{
public:
EditorWindow(EditorBaseApplication* app, const std::string& name = "", const std::vector<std::string>& categories = {});
EditorWindow(EditorBaseApplication* app, const Nz::LocalizedText& name, const std::vector<std::string>& categories = {});
virtual ~EditorWindow();
EditorWindow(const EditorWindow&) = delete;
@@ -40,7 +41,7 @@ namespace Nz
private:
EditorBaseApplication* m_application;
std::string m_windowName;
Nz::LocalizedText m_windowName;
std::vector<std::string> m_categories;
struct MenuAction