iw4x-client/src/Components/Modules/Localization.hpp

33 lines
983 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class Localization : public Component
{
public:
Localization();
~Localization();
2022-11-16 12:25:21 -05:00
static void Set(const std::string& psLocalReference, const std::string& psNewString);
2017-01-19 16:23:59 -05:00
static const char* Get(const char* key);
2022-11-16 12:25:21 -05:00
static std::optional<std::string> PrefixOverride;
static void ParseOutput(const std::function<void(Game::LocalizeEntry*)>& callback);
2017-01-19 16:23:59 -05:00
private:
static std::recursive_mutex LocalizeMutex;
static std::unordered_map<std::string, Game::LocalizeEntry*> LocalizeMap;
static Dvar::Var UseLocalization;
2022-11-16 12:25:21 -05:00
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);
2017-02-08 10:25:48 -05:00
static void SetCredits();
2022-08-31 16:21:26 -04:00
static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType);
2017-01-19 16:23:59 -05:00
};
}