use Nz::LocalizedText instead of std::string for text displayed to users
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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&);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user