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