2012-04-15 17:52:39 +02:00
|
|
|
#include "actionopen.hpp"
|
|
|
|
|
2012-05-11 11:52:07 +02:00
|
|
|
#include "../mwbase/environment.hpp"
|
2012-08-12 18:11:09 +02:00
|
|
|
#include "../mwbase/windowmanager.hpp"
|
2012-07-03 12:30:50 +02:00
|
|
|
|
2012-04-15 17:52:39 +02:00
|
|
|
#include "../mwgui/container.hpp"
|
|
|
|
|
2012-07-03 12:30:50 +02:00
|
|
|
#include "class.hpp"
|
|
|
|
#include "containerstore.hpp"
|
|
|
|
|
2012-04-15 17:52:39 +02:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
2012-09-04 15:29:51 +02:00
|
|
|
ActionOpen::ActionOpen (const MWWorld::Ptr& container) : Action (false, container)
|
|
|
|
{
|
2012-04-15 17:52:39 +02:00
|
|
|
}
|
|
|
|
|
2012-07-27 12:00:10 +02:00
|
|
|
void ActionOpen::executeImp (const MWWorld::Ptr& actor)
|
2012-04-15 17:52:39 +02:00
|
|
|
{
|
2012-05-25 18:45:17 +02:00
|
|
|
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
|
|
|
return;
|
|
|
|
|
2012-05-23 12:23:35 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container);
|
2012-09-04 15:29:51 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->getContainerWindow()->open(getTarget());
|
2012-04-15 17:52:39 +02:00
|
|
|
}
|
|
|
|
}
|