mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:15:32 +00:00
Determine when need to use the Cyrillic journal index
This commit is contained in:
parent
ce5bdd6361
commit
a83a43e376
4 changed files with 15 additions and 2 deletions
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include "../mwgui/mode.hpp"
|
#include "../mwgui/mode.hpp"
|
||||||
|
|
||||||
|
#include <components/to_utf8/to_utf8.hpp>
|
||||||
|
|
||||||
namespace Loading
|
namespace Loading
|
||||||
{
|
{
|
||||||
class Listener;
|
class Listener;
|
||||||
|
@ -365,6 +367,7 @@ namespace MWBase
|
||||||
virtual void writeFog(MWWorld::CellStore* cell) = 0;
|
virtual void writeFog(MWWorld::CellStore* cell) = 0;
|
||||||
|
|
||||||
virtual const MWGui::TextColours& getTextColours() = 0;
|
virtual const MWGui::TextColours& getTextColours() = 0;
|
||||||
|
virtual ToUTF8::FromType getEncoding() = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
|
#include <components/fontloader/fontloader.hpp>
|
||||||
|
|
||||||
#include "textcolours.hpp"
|
#include "textcolours.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,8 +220,8 @@ book JournalBooks::createQuestBook (const std::string& questName)
|
||||||
|
|
||||||
book JournalBooks::createTopicIndexBook ()
|
book JournalBooks::createTopicIndexBook ()
|
||||||
{
|
{
|
||||||
// TODO: determine actual index alphabet
|
ToUTF8::FromType encoding = MWBase::Environment::get().getWindowManager()->getEncoding();
|
||||||
bool isRussian = true;
|
bool isRussian = (encoding == ToUTF8::WINDOWS_1251);
|
||||||
|
|
||||||
BookTypesetter::Ptr typesetter = isRussian ? createCyrillicJournalIndex() : createLatinJournalIndex();
|
BookTypesetter::Ptr typesetter = isRussian ? createCyrillicJournalIndex() : createLatinJournalIndex();
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,7 @@ namespace MWGui
|
||||||
, mRestAllowed(true)
|
, mRestAllowed(true)
|
||||||
, mFallbackMap(fallbackMap)
|
, mFallbackMap(fallbackMap)
|
||||||
, mShowOwned(0)
|
, mShowOwned(0)
|
||||||
|
, mEncoding(encoding)
|
||||||
, mVersionDescription(versionDescription)
|
, mVersionDescription(versionDescription)
|
||||||
{
|
{
|
||||||
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
||||||
|
@ -2174,4 +2175,8 @@ namespace MWGui
|
||||||
return mTextColours;
|
return mTextColours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ToUTF8::FromType WindowManager::getEncoding()
|
||||||
|
{
|
||||||
|
return mEncoding;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -393,6 +393,7 @@ namespace MWGui
|
||||||
void writeFog(MWWorld::CellStore* cell);
|
void writeFog(MWWorld::CellStore* cell);
|
||||||
|
|
||||||
virtual const MWGui::TextColours& getTextColours();
|
virtual const MWGui::TextColours& getTextColours();
|
||||||
|
virtual ToUTF8::FromType getEncoding();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const MWWorld::ESMStore* mStore;
|
const MWWorld::ESMStore* mStore;
|
||||||
|
@ -515,6 +516,8 @@ namespace MWGui
|
||||||
|
|
||||||
int mShowOwned;
|
int mShowOwned;
|
||||||
|
|
||||||
|
ToUTF8::FromType mEncoding;
|
||||||
|
|
||||||
std::string mVersionDescription;
|
std::string mVersionDescription;
|
||||||
|
|
||||||
MWGui::TextColours mTextColours;
|
MWGui::TextColours mTextColours;
|
||||||
|
|
Loading…
Reference in a new issue