1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
This commit is contained in:
Glorf 2013-05-16 13:35:28 +02:00
parent 9fee99d56c
commit 0539ca6a9c
3 changed files with 7 additions and 0 deletions

View File

@ -238,6 +238,7 @@ namespace MWBase
virtual void enableRest() = 0; virtual void enableRest() = 0;
virtual bool getRestEnabled() = 0; virtual bool getRestEnabled() = 0;
virtual bool getJournalAllowed() = 0;
virtual bool getPlayerSleeping() = 0; virtual bool getPlayerSleeping() = 0;
virtual void wakeUpPlayer() = 0; virtual void wakeUpPlayer() = 0;

View File

@ -180,6 +180,10 @@ namespace
void open() void open()
{ {
if (!MWBase::Environment::get().getWindowManager ()->getJournalAllowed ())
{
MWBase::Environment::get().getWindowManager()->popGuiMode ();
}
mModel->load (); mModel->load ();
setBookMode (); setBookMode ();

View File

@ -226,6 +226,8 @@ namespace MWGui
virtual void enableRest() { mRestAllowed = true; } virtual void enableRest() { mRestAllowed = true; }
virtual bool getRestEnabled(); virtual bool getRestEnabled();
virtual bool getJournalAllowed() { return (mAllowed & GW_Magic); }
virtual bool getPlayerSleeping(); virtual bool getPlayerSleeping();
virtual void wakeUpPlayer(); virtual void wakeUpPlayer();