mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 19:09:41 +00:00
fix journal window not rendering any text
This commit is contained in:
parent
8d4afe3bf5
commit
f56182cac2
2 changed files with 5 additions and 12 deletions
|
@ -84,9 +84,9 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize)
|
||||||
MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
|
MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
|
||||||
: WindowBase("openmw_journal.layout", parWindowManager)
|
: WindowBase("openmw_journal.layout", parWindowManager)
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
, mVisible(false)
|
|
||||||
, mPageNumber(0)
|
, mPageNumber(0)
|
||||||
{
|
{
|
||||||
|
mMainWidget->setVisible(false);
|
||||||
//setCoord(0,0,498, 342);
|
//setCoord(0,0,498, 342);
|
||||||
center();
|
center();
|
||||||
|
|
||||||
|
@ -115,20 +115,15 @@ MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
|
||||||
//displayLeftText(list.front());
|
//displayLeftText(list.front());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWGui::JournalWindow::setVisible(bool visible)
|
void MWGui::JournalWindow::close()
|
||||||
{
|
{
|
||||||
if (mVisible && !visible)
|
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
|
||||||
mVisible = visible;
|
|
||||||
|
|
||||||
mMainWidget->setVisible(visible);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWGui::JournalWindow::open()
|
void MWGui::JournalWindow::open()
|
||||||
{
|
{
|
||||||
mPageNumber = 0;
|
mPageNumber = 0;
|
||||||
std::string journalOpenSound = "book open";
|
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
|
||||||
MWBase::Environment::get().getSoundManager()->playSound (journalOpenSound, 1.0, 1.0);
|
|
||||||
if(MWBase::Environment::get().getJournal()->begin()!=MWBase::Environment::get().getJournal()->end())
|
if(MWBase::Environment::get().getJournal()->begin()!=MWBase::Environment::get().getJournal()->end())
|
||||||
{
|
{
|
||||||
book journal;
|
book journal;
|
||||||
|
|
|
@ -15,8 +15,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
JournalWindow(MWBase::WindowManager& parWindowManager);
|
JournalWindow(MWBase::WindowManager& parWindowManager);
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
virtual void close();
|
||||||
virtual void setVisible(bool visible); // only used to play close sound
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void displayLeftText(std::string text);
|
void displayLeftText(std::string text);
|
||||||
|
@ -41,7 +40,6 @@ namespace MWGui
|
||||||
std::vector<std::string> mLeftPages;
|
std::vector<std::string> mLeftPages;
|
||||||
std::vector<std::string> mRightPages;
|
std::vector<std::string> mRightPages;
|
||||||
int mPageNumber; //store the number of the current left page
|
int mPageNumber; //store the number of the current left page
|
||||||
bool mVisible;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue