2012-04-15 15:52:39 +00:00
|
|
|
#include "actionopen.hpp"
|
|
|
|
|
2012-05-11 09:52:07 +00:00
|
|
|
#include "../mwbase/environment.hpp"
|
2012-04-15 15:52:39 +00:00
|
|
|
#include "class.hpp"
|
|
|
|
#include "world.hpp"
|
|
|
|
#include "containerstore.hpp"
|
|
|
|
#include "../mwclass/container.hpp"
|
|
|
|
#include "../mwgui/window_manager.hpp"
|
|
|
|
#include "../mwgui/container.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
ActionOpen::ActionOpen (const MWWorld::Ptr& container) : mContainer (container) {
|
|
|
|
mContainer = container;
|
|
|
|
}
|
|
|
|
|
2012-05-11 09:52:07 +00:00
|
|
|
void ActionOpen::execute ()
|
2012-04-15 15:52:39 +00:00
|
|
|
{
|
2012-05-25 16:45:17 +00:00
|
|
|
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
|
|
|
return;
|
|
|
|
|
2012-05-23 10:23:35 +00:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container);
|
2012-05-11 09:52:07 +00:00
|
|
|
MWBase::Environment::get().getWindowManager()->getContainerWindow()->open(mContainer);
|
2012-04-15 15:52:39 +00:00
|
|
|
}
|
|
|
|
}
|