mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
e577731a06
@ -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…
x
Reference in New Issue
Block a user