iw4x-client/src/Components/Modules/Localization.hpp
2022-11-16 17:25:21 +00:00

33 lines
983 B
C++

#pragma once
namespace Components
{
class Localization : public Component
{
public:
Localization();
~Localization();
static void Set(const std::string& psLocalReference, const std::string& psNewString);
static const char* Get(const char* key);
static std::optional<std::string> PrefixOverride;
static void ParseOutput(const std::function<void(Game::LocalizeEntry*)>& callback);
private:
static std::recursive_mutex LocalizeMutex;
static std::unordered_map<std::string, Game::LocalizeEntry*> LocalizeMap;
static Dvar::Var UseLocalization;
static std::function<void(Game::LocalizeEntry*)> ParseCallback;
static void __stdcall SetStringStub(const char* psLocalReference, const char* psNewString, int bSentenceIsEnglish);
static void SaveParseOutput(Game::LocalizeEntry* asset);
static void SetCredits();
static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType);
};
}