mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 22:53:53 +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)
|
||||
: WindowBase("openmw_journal.layout", parWindowManager)
|
||||
, mLastPos(0)
|
||||
, mVisible(false)
|
||||
, mPageNumber(0)
|
||||
{
|
||||
mMainWidget->setVisible(false);
|
||||
//setCoord(0,0,498, 342);
|
||||
center();
|
||||
|
||||
|
@ -115,20 +115,15 @@ MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
|
|||
//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);
|
||||
mVisible = visible;
|
||||
|
||||
mMainWidget->setVisible(visible);
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
|
||||
}
|
||||
|
||||
void MWGui::JournalWindow::open()
|
||||
{
|
||||
mPageNumber = 0;
|
||||
std::string journalOpenSound = "book open";
|
||||
MWBase::Environment::get().getSoundManager()->playSound (journalOpenSound, 1.0, 1.0);
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
|
||||
if(MWBase::Environment::get().getJournal()->begin()!=MWBase::Environment::get().getJournal()->end())
|
||||
{
|
||||
book journal;
|
||||
|
|
|
@ -15,8 +15,7 @@ namespace MWGui
|
|||
public:
|
||||
JournalWindow(MWBase::WindowManager& parWindowManager);
|
||||
virtual void open();
|
||||
|
||||
virtual void setVisible(bool visible); // only used to play close sound
|
||||
virtual void close();
|
||||
|
||||
private:
|
||||
void displayLeftText(std::string text);
|
||||
|
@ -41,7 +40,6 @@ namespace MWGui
|
|||
std::vector<std::string> mLeftPages;
|
||||
std::vector<std::string> mRightPages;
|
||||
int mPageNumber; //store the number of the current left page
|
||||
bool mVisible;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue