@ -360,8 +360,6 @@ namespace MWGui
bool questList = mResourceSystem - > getVFS ( ) - > exists ( " textures/tx_menubook_options_over.dds " ) ;
auto journal = JournalWindow : : create ( JournalViewModel : : create ( ) , questList , mEncoding ) ;
mGuiModeStates [ GM_Journal ] = GuiModeState ( journal . get ( ) ) ;
mGuiModeStates [ GM_Journal ] . mCloseSound = ESM : : RefId : : stringRefId ( " book close " ) ;
mGuiModeStates [ GM_Journal ] . mOpenSound = ESM : : RefId : : stringRefId ( " book open " ) ;
mWindows . push_back ( std : : move ( journal ) ) ;
mMessageBoxManager = std : : make_unique < MessageBoxManager > (
@ -398,15 +396,11 @@ namespace MWGui
mScrollWindow = scrollWindow . get ( ) ;
mWindows . push_back ( std : : move ( scrollWindow ) ) ;
mGuiModeStates [ GM_Scroll ] = GuiModeState ( mScrollWindow ) ;
mGuiModeStates [ GM_Scroll ] . mOpenSound = ESM : : RefId : : stringRefId ( " scroll " ) ;
mGuiModeStates [ GM_Scroll ] . mCloseSound = ESM : : RefId : : stringRefId ( " scroll " ) ;
auto bookWindow = std : : make_unique < BookWindow > ( ) ;
mBookWindow = bookWindow . get ( ) ;
mWindows . push_back ( std : : move ( bookWindow ) ) ;
mGuiModeStates [ GM_Book ] = GuiModeState ( mBookWindow ) ;
mGuiModeStates [ GM_Book ] . mOpenSound = ESM : : RefId : : stringRefId ( " book open " ) ;
mGuiModeStates [ GM_Book ] . mCloseSound = ESM : : RefId : : stringRefId ( " book close " ) ;
auto countDialog = std : : make_unique < CountDialog > ( ) ;
mCountDialog = countDialog . get ( ) ;
@ -1274,7 +1268,6 @@ namespace MWGui
mGuiModes . push_back ( mode ) ;
mGuiModeStates [ mode ] . update ( true ) ;
playSound ( mGuiModeStates [ mode ] . mOpenSound ) ;
}
if ( force )
mContainerWindow - > treatNextOpenAsLoot ( ) ;
@ -1311,7 +1304,7 @@ namespace MWGui
return mViewer - > getCamera ( ) - > getCullMask ( ) ;
}
void WindowManager : : popGuiMode ( bool noSound )
void WindowManager : : popGuiMode ( )
{
if ( mDragAndDrop & & mDragAndDrop - > mIsOnDragAndDrop )
{
@ -1324,8 +1317,6 @@ namespace MWGui
mKeyboardNavigation - > saveFocus ( mode ) ;
mGuiModes . pop_back ( ) ;
mGuiModeStates [ mode ] . update ( false ) ;
if ( ! noSound )
playSound ( mGuiModeStates [ mode ] . mCloseSound ) ;
MWBase : : Environment : : get ( ) . getLuaManager ( ) - > uiModeChanged ( MWWorld : : Ptr ( ) ) ;
}
@ -1343,11 +1334,11 @@ namespace MWGui
mConsole - > onOpen ( ) ;
}
void WindowManager : : removeGuiMode ( GuiMode mode , bool noSound )
void WindowManager : : removeGuiMode ( GuiMode mode )
{
if ( ! mGuiModes . empty ( ) & & mGuiModes . back ( ) = = mode )
{
popGuiMode ( noSound ) ;
popGuiMode ( ) ;
return ;
}